diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-26 18:52:44 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-27 11:44:16 +0100 |
commit | 62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch) | |
tree | 7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/src/MGLStyleValue_Private.h | |
parent | a662508ddde4043ece36d8ea9b424368891d892c (diff) | |
download | qtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz |
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/src/MGLStyleValue_Private.h')
-rw-r--r-- | platform/darwin/src/MGLStyleValue_Private.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h index 2c3de3fb74..3772a7902a 100644 --- a/platform/darwin/src/MGLStyleValue_Private.h +++ b/platform/darwin/src/MGLStyleValue_Private.h @@ -17,7 +17,7 @@ template <typename MBGLType, typename ObjCType, typename MBGLElement = MBGLType, typename ObjCEnum = ObjCType> class MGLStyleValueTransformer { public: - + MGLStyleValue<ObjCType> *toStyleValue(const mbgl::style::PropertyValue<MBGLType> &mbglValue) { if (mbglValue.isConstant()) { return toStyleConstantValue(mbglValue.asConstant()); @@ -109,7 +109,7 @@ private: auto rawValue = toMGLRawStyleValue(mbglValue); return [MGLStyleConstantValue<ObjCType> valueWithRawValue:rawValue]; } - + MGLStyleFunction<ObjCType> *toStyleFunction(const mbgl::style::Function<MBGLType> &mbglFunction) { const auto &mbglStops = mbglFunction.getStops(); NSMutableDictionary *stops = [NSMutableDictionary dictionaryWithCapacity:mbglStops.size()]; @@ -133,29 +133,29 @@ private: NSNumber *toMGLRawStyleValue(const bool mbglStopValue) { return @(mbglStopValue); } - + NSNumber *toMGLRawStyleValue(const float mbglStopValue) { return @(mbglStopValue); } - + NSString *toMGLRawStyleValue(const std::string &mbglStopValue) { return @(mbglStopValue.c_str()); } - + // Offsets NSValue *toMGLRawStyleValue(const std::array<float, 2> &mbglStopValue) { return [NSValue mgl_valueWithOffsetArray:mbglStopValue]; } - + // Padding NSValue *toMGLRawStyleValue(const std::array<float, 4> &mbglStopValue) { return [NSValue mgl_valueWithPaddingArray:mbglStopValue]; } - + MGLColor *toMGLRawStyleValue(const mbgl::Color mbglStopValue) { return [MGLColor mgl_colorWithColor:mbglStopValue]; } - + ObjCType toMGLRawStyleValue(const std::vector<MBGLElement> &mbglStopValue) { NSMutableArray *array = [NSMutableArray arrayWithCapacity:mbglStopValue.size()]; for (const auto &mbglElement: mbglStopValue) { @@ -169,29 +169,29 @@ private: void getMBGLValue(NSNumber *rawValue, bool &mbglValue) { mbglValue = !!rawValue.boolValue; } - + void getMBGLValue(NSNumber *rawValue, float &mbglValue) { mbglValue = rawValue.floatValue; } - + void getMBGLValue(NSString *rawValue, std::string &mbglValue) { mbglValue = rawValue.UTF8String; } - + // Offsets void getMBGLValue(NSValue *rawValue, std::array<float, 2> &mbglValue) { mbglValue = rawValue.mgl_offsetArrayValue; } - + // Padding void getMBGLValue(NSValue *rawValue, std::array<float, 4> &mbglValue) { mbglValue = rawValue.mgl_paddingArrayValue; } - + void getMBGLValue(MGLColor *rawValue, mbgl::Color &mbglValue) { mbglValue = rawValue.mgl_color; } - + void getMBGLValue(ObjCType rawValue, std::vector<MBGLElement> &mbglValue) { mbglValue.reserve(rawValue.count); for (id obj in rawValue) { |