diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-12 16:16:21 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-13 11:57:09 +0300 |
commit | c670b08ecb431b1bfd02da748de3d9fa16a757ec (patch) | |
tree | b1c19eab6e4b895018df67da4cd5a61e75b431f2 /src/mbgl/style/paint_property.hpp | |
parent | a73c81cc55671c8f3f5916c310353a22d6a6f231 (diff) | |
download | qtlocation-mapboxgl-c670b08ecb431b1bfd02da748de3d9fa16a757ec.tar.gz |
[core] Use PropertyValue<T> for Annotation line/fill
Diffstat (limited to 'src/mbgl/style/paint_property.hpp')
-rw-r--r-- | src/mbgl/style/paint_property.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index b982fe76e2..332ec051dc 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -39,8 +39,12 @@ public: return *this; } + bool isUndefined() const { + return values.find(ClassID::Default) == values.end(); + } + const PropertyValue<T>& get() const { - return values.at(ClassID::Default); + return isUndefined() ? values.at(ClassID::Fallback) : values.at(ClassID::Default); } void set(const PropertyValue<T>& value_, const optional<std::string>& klass) { |