diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-04 12:04:22 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-07 11:19:08 -0800 |
commit | cdd129335cc7a58ef57b2258b4cde5b56ce414a6 (patch) | |
tree | e2abffd54e932c6bb988c8f0f57c3c7018e50e69 /src/mbgl/style/layout_property.hpp | |
parent | 0a0007e0acdce85576857bec76e1333d771472f1 (diff) | |
download | qtlocation-mapboxgl-cdd129335cc7a58ef57b2258b4cde5b56ce414a6.tar.gz |
[core] Make Paint/LayoutProperties constructor explicit
Diffstat (limited to 'src/mbgl/style/layout_property.hpp')
-rw-r--r-- | src/mbgl/style/layout_property.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/layout_property.hpp b/src/mbgl/style/layout_property.hpp index db2b2d3aba..65ce06a153 100644 --- a/src/mbgl/style/layout_property.hpp +++ b/src/mbgl/style/layout_property.hpp @@ -14,7 +14,7 @@ using JSVal = rapidjson::Value; template <typename T> class LayoutProperty { public: - LayoutProperty(T v) : value(std::move(v)) {} + explicit LayoutProperty(T v) : value(std::move(v)) {} void parse(const char * name, const JSVal& layout) { if (layout.HasMember(name)) { @@ -28,6 +28,7 @@ public: } } + void operator=(const T& v) { value = v; } operator T() const { return value; } mapbox::util::optional<Function<T>> parsedValue; |