diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-28 18:19:17 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-11-29 09:53:28 +0200 |
commit | cd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb (patch) | |
tree | 42e601f7b16a83a62a8418511b795b6dfcf9eeff /platform/darwin/src/MGLShapeSource_Private.h | |
parent | e3d1daaf6687467ee5c064d2577d2903c508c2dc (diff) | |
download | qtlocation-mapboxgl-cd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb.tar.gz |
[core][android][darwin] Fix GeoJSONOptions handling
- share the `GeoJSONOptions` instances using `Immutable<GeoJSONOptions>` - avoid extra copying
- fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas.
Previously, local variables were wrapped by reference.
Diffstat (limited to 'platform/darwin/src/MGLShapeSource_Private.h')
-rw-r--r-- | platform/darwin/src/MGLShapeSource_Private.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLShapeSource_Private.h b/platform/darwin/src/MGLShapeSource_Private.h index c7eaf3d0a8..940c80a17d 100644 --- a/platform/darwin/src/MGLShapeSource_Private.h +++ b/platform/darwin/src/MGLShapeSource_Private.h @@ -1,6 +1,8 @@ #import "MGLFoundation.h" #import "MGLShapeSource.h" +#include <mbgl/util/immutable.hpp> + NS_ASSUME_NONNULL_BEGIN namespace mbgl { @@ -10,7 +12,7 @@ namespace mbgl { } MGL_EXPORT -mbgl::style::GeoJSONOptions MGLGeoJSONOptionsFromDictionary(NSDictionary<MGLShapeSourceOption, id> *options); +mbgl::Immutable<mbgl::style::GeoJSONOptions> MGLGeoJSONOptionsFromDictionary(NSDictionary<MGLShapeSourceOption, id> *options); @interface MGLShapeSource (Private) |