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:
parent
97b39d3c64
commit
cba51a2052
1 changed files with 7 additions and 5 deletions
12
main.go
12
main.go
|
@ -205,14 +205,16 @@ func main() {
|
||||||
}
|
}
|
||||||
hydrants = append(hydrants, h)
|
hydrants = append(hydrants, h)
|
||||||
|
|
||||||
switch {
|
if minLat > h.Latitude {
|
||||||
case minLat > h.Latitude:
|
|
||||||
minLat = h.Latitude
|
minLat = h.Latitude
|
||||||
case maxLat < h.Latitude:
|
}
|
||||||
|
if maxLat < h.Latitude {
|
||||||
maxLat = h.Latitude
|
maxLat = h.Latitude
|
||||||
case minLon > h.Longitude:
|
}
|
||||||
|
if minLon > h.Longitude {
|
||||||
minLon = h.Longitude
|
minLon = h.Longitude
|
||||||
case maxLon < h.Longitude:
|
}
|
||||||
|
if maxLon < h.Longitude {
|
||||||
maxLon = h.Longitude
|
maxLon = h.Longitude
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue