[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()
This commit is contained in:
@@ -275,13 +275,13 @@ LatLngBounds Map::latLngBoundsForCamera(const CameraOptions& camera) const {
|
||||
|
||||
#pragma mark - Bounds
|
||||
|
||||
optional<LatLngBounds> Map::getLatLngBounds() const {
|
||||
LatLngBounds Map::getLatLngBounds() const {
|
||||
return impl->transform.getState().getLatLngBounds();
|
||||
}
|
||||
|
||||
void Map::setLatLngBounds(optional<LatLngBounds> bounds) {
|
||||
void Map::setLatLngBounds(LatLngBounds bounds) {
|
||||
impl->cameraMutated = true;
|
||||
impl->transform.setLatLngBounds(bounds);
|
||||
impl->transform.setLatLngBounds(std::move(bounds));
|
||||
impl->onUpdate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user