diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-07 16:04:20 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-11 10:40:30 +0200 |
commit | ac50f5275b45fa6a0859da0b162b561f8f2e567e (patch) | |
tree | 6648882b724ce6acc1cb082eaa1b45e2cf6fcb64 /src/mbgl/style/sources/custom_geometry_source_impl.cpp | |
parent | def38cf4db9e973f1d3e13f4ee2fba1afd694ea0 (diff) | |
download | qtlocation-mapboxgl-ac50f5275b45fa6a0859da0b162b561f8f2e567e.tar.gz |
[core] Make CustomGeometrySource::TileOptions immutable
Diffstat (limited to 'src/mbgl/style/sources/custom_geometry_source_impl.cpp')
-rw-r--r-- | src/mbgl/style/sources/custom_geometry_source_impl.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mbgl/style/sources/custom_geometry_source_impl.cpp b/src/mbgl/style/sources/custom_geometry_source_impl.cpp index 67d52bdc24..95da377277 100644 --- a/src/mbgl/style/sources/custom_geometry_source_impl.cpp +++ b/src/mbgl/style/sources/custom_geometry_source_impl.cpp @@ -4,27 +4,20 @@ namespace mbgl { namespace style { -CustomGeometrySource::Impl::Impl(std::string id_, - const CustomGeometrySource::Options options) +CustomGeometrySource::Impl::Impl(std::string id_, CustomGeometrySource::Options options) : Source::Impl(SourceType::CustomVector, std::move(id_)), - tileOptions(options.tileOptions), + tileOptions(makeMutable<CustomGeometrySource::TileOptions>(options.tileOptions)), zoomRange(options.zoomRange), - loaderRef({}) { -} + loaderRef({}) {} CustomGeometrySource::Impl::Impl(const Impl& impl, ActorRef<CustomTileLoader> loaderRef_) - : Source::Impl(impl), - tileOptions(impl.tileOptions), - zoomRange(impl.zoomRange), - loaderRef(loaderRef_){ - -} + : Source::Impl(impl), tileOptions(impl.tileOptions), zoomRange(impl.zoomRange), loaderRef(loaderRef_) {} optional<std::string> CustomGeometrySource::Impl::getAttribution() const { return {}; } -CustomGeometrySource::TileOptions CustomGeometrySource::Impl::getTileOptions() const { +Immutable<CustomGeometrySource::TileOptions> CustomGeometrySource::Impl::getTileOptions() const { return tileOptions; } |