summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-11-04 08:12:23 +0200
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-11-13 13:31:01 +0200
commit4c1d03c257754ecc1555f3e31b3c6ccf45c4bf7b (patch)
treed6bd914727d337216e269b08b139a87bca7f41d4 /include/mbgl
parent089ff8e2b34583de6c989c05a0771b108b3c82f0 (diff)
downloadqtlocation-mapboxgl-4c1d03c257754ecc1555f3e31b3c6ccf45c4bf7b.tar.gz
[core] Fix MapSnapshotter build failure on Windows
MSVC implementation of std::promise is buggy and only works with types that can be default-constructed. To avoid a compilation failure in the instantiation of ask() inside MapSnapshotter::getRegion(), which creates a std::promise<LanLngBounds>, make LatLngBounds' default constructor public.
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/util/geo.hpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 170eca4f0a..9e1ecfff91 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -105,14 +105,12 @@ public:
return bounds;
}
- /// Returns an infinite bound, a bound for which the constrain method returns its
+ /// Construct an infinite bound, a bound for which the constrain method returns its
/// input unmodified.
///
/// Note: this is different than LatLngBounds::world() since arbitrary unwrapped
/// coordinates are also inside the bounds.
- static LatLngBounds unbounded() {
- return {};
- }
+ LatLngBounds() : sw({-90, -180}), ne({90, 180}), bounded(false) {}
// Constructs a LatLngBounds object with the tile's exact boundaries.
LatLngBounds(const CanonicalTileID&);
@@ -172,9 +170,6 @@ private:
LatLngBounds(LatLng sw_, LatLng ne_) : sw(sw_), ne(ne_) {}
- LatLngBounds()
- : sw({-90, -180}), ne({90, 180}), bounded(false) {}
-
bool containsLatitude(double latitude) const;
bool containsLongitude(double longitude, LatLng::WrapMode wrap) const;