diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-08-26 00:32:00 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-08-26 22:27:55 -0700 |
commit | b1cc89fc9c83784c30afcf67e40130ddc69d989c (patch) | |
tree | b77a6f4ddc0156cdf8c425ec3bd451cfdafa045f /platform/darwin | |
parent | 1e1ae8fd25fd633305738c98515f8f46fc08251d (diff) | |
download | qtlocation-mapboxgl-b1cc89fc9c83784c30afcf67e40130ddc69d989c.tar.gz |
[ios, macos] Fixed roundtripping padding functions
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/src/MGLStyleAttributeFunction.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLStyleAttributeFunction.mm b/platform/darwin/src/MGLStyleAttributeFunction.mm index 46fa3ec6a7..56dd852b35 100644 --- a/platform/darwin/src/MGLStyleAttributeFunction.mm +++ b/platform/darwin/src/MGLStyleAttributeFunction.mm @@ -94,7 +94,7 @@ { __block std::vector<std::pair<float, std::array<float, 4>>> stops; [self.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, NSValue * _Nonnull padding, BOOL * _Nonnull stop) { - NSAssert([padding isKindOfClass:[NSArray class]], @"Stops should be NSValue"); + NSAssert([padding isKindOfClass:[NSValue class]], @"Stops should be NSValue"); stops.emplace_back(zoomKey.floatValue, padding.mgl_paddingArrayValue); }]; return mbgl::style::Function<std::array<float, 4>>({{stops}}, _base.floatValue); @@ -181,7 +181,7 @@ auto stops = property.getStops(); NSMutableDictionary *convertedStops = [NSMutableDictionary dictionaryWithCapacity:stops.size()]; for (auto stop : stops) { - convertedStops[@(stop.first)] = @[@(stop.second[0]), @(stop.second[1]), @(stop.second[2]), @(stop.second[3])]; + convertedStops[@(stop.first)] = [NSValue mgl_valueWithPaddingArray:stop.second]; } function.base = @(property.getBase()); function.stops = convertedStops; |