[core] Comparison operators for LatLngBounds

This commit is contained in:
John Firebaugh
2016-02-03 14:14:35 -08:00
parent 87bac32a33
commit bc1f4b1fc0

View File

@@ -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;