This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
LatLng and LatLngBounds should enforce invariants #3802
Labels
Core
The cross-platform C++ core, aka mbgl
Remove
operator bool()
from both classes and enforce the following invariants.LatLng
constructor throws if any of the following are violated:std::isfinite(latitude)
std::isfinite(longitude)
-90 <= latitude <= 90
LatLngBounds
constructor swaps coordinates as necessary to enforce:sw.latitude <= ne.latitude
sw.longitude <= ne.longitude
The text was updated successfully, but these errors were encountered: