diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-03-26 23:42:29 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-03-26 23:42:29 -0700 |
commit | b330dbe7790c15de2ef6ace2914dfddcceb7bebe (patch) | |
tree | 8cbff13a882d5c0e1754a9ba6420c7a125166a09 | |
parent | bf3c87b17ffe8e560f9509ba99d8e1e923d034fe (diff) | |
download | qtlocation-mapboxgl-b330dbe7790c15de2ef6ace2914dfddcceb7bebe.tar.gz |
no need to iterate passed dictionary
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index a3211575d9..a38251541b 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -241,7 +241,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; if (!event) return; - NSMutableDictionary *evt = [[NSMutableDictionary alloc] init]; + NSMutableDictionary *evt = [[NSMutableDictionary alloc] initWithDictionary:attributeDictionary]; // mapbox-events stock attributes [evt setObject:event forKey:@"event"]; [evt setObject:@(1) forKey:@"version"]; @@ -260,11 +260,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; [evt setValue:[weakSelf getCurrentCellularNetworkConnectionType] forKey:@"cellularNetworkType"]; [evt setValue:[weakSelf getWifiNetworkName] forKey:@"wifi"]; [evt setValue:@([weakSelf getContentSizeScale]) forKey:@"accessibilityFontScale"]; - - for (NSString *key in [attributeDictionary allKeys]) { - [evt setObject:[attributeDictionary valueForKey:key] forKey:key]; - } - + // Make Immutable Version NSDictionary *finalEvent = [NSDictionary dictionaryWithDictionary:evt]; |