summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLShapeSource_Private.h
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-28 18:19:17 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-11-29 09:53:28 +0200
commitcd4136ed4b4fc5d9a44fe17aa98dfd590c9c0bfb (patch)
tree42e601f7b16a83a62a8418511b795b6dfcf9eeff /platform/darwin/src/MGLShapeSource_Private.h
parente3d1daaf6687467ee5c064d2577d2903c508c2dc (diff)
downloadqtlocation-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.h4
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)