[core] Remove superflous inlines
This commit is contained in:
@@ -16,10 +16,10 @@ public:
|
||||
double latitude = 0;
|
||||
double longitude = 0;
|
||||
|
||||
inline LatLng(double lat = 0, double lon = 0)
|
||||
LatLng(double lat = 0, double lon = 0)
|
||||
: latitude(lat), longitude(lon) {}
|
||||
|
||||
inline operator bool() const {
|
||||
operator bool() const {
|
||||
return !(std::isnan(latitude) || std::isnan(longitude));
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ public:
|
||||
double northing = 0;
|
||||
double easting = 0;
|
||||
|
||||
inline ProjectedMeters(double n = 0, double e = 0)
|
||||
ProjectedMeters(double n = 0, double e = 0)
|
||||
: northing(n), easting(e) {}
|
||||
|
||||
inline operator bool() const {
|
||||
operator bool() const {
|
||||
return !(std::isnan(northing) || std::isnan(easting));
|
||||
}
|
||||
};
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
LatLng sw = {-90, -180};
|
||||
LatLng ne = {90, 180};
|
||||
|
||||
inline LatLngBounds() {}
|
||||
LatLngBounds() {}
|
||||
|
||||
inline LatLngBounds(const LatLng& sw_, const LatLng& ne_)
|
||||
LatLngBounds(const LatLng& sw_, const LatLng& ne_)
|
||||
: sw(sw_), ne(ne_) {}
|
||||
|
||||
static inline LatLngBounds getExtendable() {
|
||||
static LatLngBounds getExtendable() {
|
||||
LatLngBounds bounds;
|
||||
return { bounds.ne, bounds.sw };
|
||||
}
|
||||
@@ -60,26 +60,26 @@ public:
|
||||
// Constructs a LatLngBounds object with the tile's exact boundaries.
|
||||
LatLngBounds(const TileID& id);
|
||||
|
||||
inline void extend(const LatLng& point) {
|
||||
void extend(const LatLng& point) {
|
||||
if (point.latitude < sw.latitude) sw.latitude = point.latitude;
|
||||
if (point.latitude > ne.latitude) ne.latitude = point.latitude;
|
||||
if (point.longitude < sw.longitude) sw.longitude = point.longitude;
|
||||
if (point.longitude > ne.longitude) ne.longitude = point.longitude;
|
||||
}
|
||||
|
||||
inline void extend(const LatLngBounds& bounds) {
|
||||
void extend(const LatLngBounds& bounds) {
|
||||
extend(bounds.sw);
|
||||
extend(bounds.ne);
|
||||
}
|
||||
|
||||
inline bool contains(const LatLng& point) const {
|
||||
bool contains(const LatLng& point) const {
|
||||
return (point.latitude >= sw.latitude &&
|
||||
point.latitude <= ne.latitude &&
|
||||
point.longitude >= sw.longitude &&
|
||||
point.longitude <= ne.longitude);
|
||||
}
|
||||
|
||||
inline bool intersects(const LatLngBounds area) const {
|
||||
bool intersects(const LatLngBounds area) const {
|
||||
return (area.ne.latitude > sw.latitude &&
|
||||
area.sw.latitude < ne.latitude &&
|
||||
area.ne.longitude > sw.longitude &&
|
||||
@@ -92,10 +92,10 @@ public:
|
||||
ProjectedMeters sw;
|
||||
ProjectedMeters ne;
|
||||
|
||||
inline MetersBounds(const ProjectedMeters& sw_, const ProjectedMeters& ne_)
|
||||
MetersBounds(const ProjectedMeters& sw_, const ProjectedMeters& ne_)
|
||||
: sw(sw_), ne(ne_) {}
|
||||
|
||||
inline operator bool() const {
|
||||
operator bool() const {
|
||||
return sw && ne;
|
||||
}
|
||||
};
|
||||
@@ -116,23 +116,23 @@ public:
|
||||
double bottom = 0; ///< Number of pixels inset from the bottom edge.
|
||||
double right = 0; ///< Number of pixels inset from the right edge.
|
||||
|
||||
inline EdgeInsets() {}
|
||||
EdgeInsets() {}
|
||||
|
||||
inline EdgeInsets(const double t, const double l, const double b, const double r)
|
||||
EdgeInsets(const double t, const double l, const double b, const double r)
|
||||
: top(t), left(l), bottom(b), right(r) {}
|
||||
|
||||
inline operator bool() const {
|
||||
operator bool() const {
|
||||
return top || left || bottom || right;
|
||||
}
|
||||
|
||||
inline void operator+=(const EdgeInsets& o) {
|
||||
void operator+=(const EdgeInsets& o) {
|
||||
top += o.top;
|
||||
left += o.left;
|
||||
bottom += o.bottom;
|
||||
right += o.right;
|
||||
}
|
||||
|
||||
inline EdgeInsets operator+(const EdgeInsets& o) const {
|
||||
EdgeInsets operator+(const EdgeInsets& o) const {
|
||||
return {
|
||||
top + o.top, left + o.left, bottom + o.bottom, right + o.right,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user