diff options
author | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2019-03-08 15:53:25 +0200 |
---|---|---|
committer | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2019-03-14 18:33:11 +0200 |
commit | 11de777628e9e2c4b219bae3f1a6eabd86f2a3c5 (patch) | |
tree | 202156e7253dbc6cbb5fc5c4a04a98e8ed55e681 /src/mbgl/map/transform_state.hpp | |
parent | a73cc9d8e363b0b3f4fa66c5d9c34625dffbb7e5 (diff) | |
download | qtlocation-mapboxgl-11de777628e9e2c4b219bae3f1a6eabd86f2a3c5.tar.gz |
[core] Remove optional from Map::setLatLngBounds()
This is a first step into grouping together bounds related Map methods
into one that takes a "BoundOptions" object. LatLngBounds::unbounded()
replaces an undefined optional<LatLngBounds>.
v2: Document LatLngBounds::unbounded()
Diffstat (limited to 'src/mbgl/map/transform_state.hpp')
-rw-r--r-- | src/mbgl/map/transform_state.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/map/transform_state.hpp b/src/mbgl/map/transform_state.hpp index 44eb1a8a3e..811fa253af 100644 --- a/src/mbgl/map/transform_state.hpp +++ b/src/mbgl/map/transform_state.hpp @@ -55,8 +55,8 @@ public: double getZoomFraction() const; // Bounds - void setLatLngBounds(optional<LatLngBounds>); - optional<LatLngBounds> getLatLngBounds() const; + void setLatLngBounds(LatLngBounds); + LatLngBounds getLatLngBounds() const; void setMinZoom(double); double getMinZoom() const; void setMaxZoom(double); @@ -93,7 +93,7 @@ private: bool rotatedNorth() const; void constrain(double& scale, double& x, double& y) const; - optional<LatLngBounds> bounds; + LatLngBounds bounds; // Limit the amount of zooming possible on the map. double min_scale = std::pow(2, 0); |