summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layout_property.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-04 12:04:22 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-07 11:19:08 -0800
commitcdd129335cc7a58ef57b2258b4cde5b56ce414a6 (patch)
treee2abffd54e932c6bb988c8f0f57c3c7018e50e69 /src/mbgl/style/layout_property.hpp
parent0a0007e0acdce85576857bec76e1333d771472f1 (diff)
downloadqtlocation-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.hpp3
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;