[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.
This commit is contained in:
Mikhail Pozdnyakov
2019-11-28 18:19:17 +02:00
parent e3d1daaf66
commit cd4136ed4b
12 changed files with 104 additions and 97 deletions

View File

@@ -48,9 +48,9 @@ std::vector<Feature> getTopClusterFeature(QueryTest& test) {
};
LatLng coordinate{0, 0};
GeoJSONOptions options{};
options.cluster = true;
auto source = std::make_unique<GeoJSONSource>("cluster_source"s, options);
Mutable<GeoJSONOptions> options = makeMutable<GeoJSONOptions>();
options->cluster = true;
auto source = std::make_unique<GeoJSONSource>("cluster_source"s, std::move(options));
source->setURL("http://url"s);
source->loadDescription(*test.fileSource);