1
0
Fork 0
mirror of https://github.com/Luzifer/gpxhydrant.git synced 2024-12-22 20:21:17 +00:00

Fix: All values need to be evaluated, switch is bad

This commit is contained in:
Knut Ahlers 2016-05-07 14:13:21 +02:00
parent 97b39d3c64
commit cba51a2052
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

12
main.go
View file

@ -205,14 +205,16 @@ func main() {
}
hydrants = append(hydrants, h)
switch {
case minLat > h.Latitude:
if minLat > h.Latitude {
minLat = h.Latitude
case maxLat < h.Latitude:
}
if maxLat < h.Latitude {
maxLat = h.Latitude
case minLon > h.Longitude:
}
if minLon > h.Longitude {
minLon = h.Longitude
case maxLon < h.Longitude:
}
if maxLon < h.Longitude {
maxLon = h.Longitude
}
}