diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:18:09 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:24:11 +0300 |
commit | 9ef30c23527ef0e8dfe4a7b486624a284ccc016a (patch) | |
tree | dca8f5a1168d05e409a322411befc4222077d98d /src/mbgl/style/paint_property.hpp | |
parent | 765e8d2be18411cc13438cb4c723b6a6658b8c10 (diff) | |
download | qtlocation-mapboxgl-9ef30c23527ef0e8dfe4a7b486624a284ccc016a.tar.gz |
[core] Update color layer properties code generator
Diffstat (limited to 'src/mbgl/style/paint_property.hpp')
-rw-r--r-- | src/mbgl/style/paint_property.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index 332ec051dc..6da1ed53b4 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -44,7 +44,9 @@ public: } const PropertyValue<T>& get() const { - return isUndefined() ? values.at(ClassID::Fallback) : values.at(ClassID::Default); + static const PropertyValue<T> staticValue; + const auto it = values.find(ClassID::Default); + return it == values.end() ? staticValue : it->second; } void set(const PropertyValue<T>& value_, const optional<std::string>& klass) { |