summaryrefslogtreecommitdiff
path: root/include/mbgl/util/geo.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/util/geo.hpp')
-rw-r--r--include/mbgl/util/geo.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 99b5743877..86bc586cba 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -131,8 +131,19 @@ private:
LatLngBounds(const LatLng& sw_, const LatLng& ne_)
: sw(sw_), ne(ne_) {}
+
+ friend bool operator==(const LatLngBounds&, const LatLngBounds&);
+ friend bool operator!=(const LatLngBounds&, const LatLngBounds&);
};
+inline bool operator==(const LatLngBounds& a, const LatLngBounds& b) {
+ return a.sw == b.sw && a.ne == b.ne;
+}
+
+inline bool operator!=(const LatLngBounds& a, const LatLngBounds& b) {
+ return !(a == b);
+}
+
class MetersBounds {
public:
ProjectedMeters sw;