code cleanup

This commit is contained in:
Torrie Fischer 2012-04-25 16:25:07 -04:00
parent 7210498517
commit 3421a6e267

View File

@ -117,10 +117,7 @@ public class RegionManager {
int minDistance = -1;
for(Region r : regions) {
int check = distance(loc, r.location());
if (minDistance == -1) {
nearest = r;
minDistance = check;
} else if (check < minDistance) {
if (minDistance == -1 || check < minDistance) {
nearest = r;
minDistance = check;
}