summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-27 18:22:57 +0300
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-09-27 19:17:25 +0300
commitd446b3382b7de03d9031445e37c1ebf183092ea2 (patch)
tree7e2e1ef39681aa46e794d3c702febf566c4fe53b /include
parentbb9b1ab62438f733ad278cb03f781116b9f3d721 (diff)
downloadqtlocation-mapboxgl-d446b3382b7de03d9031445e37c1ebf183092ea2.tar.gz
[core] Enable move semantics for StyleProperty
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/style_property.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/mbgl/style/style_property.hpp b/include/mbgl/style/style_property.hpp
index 43787c7919..fc34078dec 100644
--- a/include/mbgl/style/style_property.hpp
+++ b/include/mbgl/style/style_property.hpp
@@ -8,12 +8,18 @@ namespace style {
/**
* @brief Generic representation of a style property.
*/
-struct StyleProperty {
+class StyleProperty {
+public:
enum class Kind : uint8_t { Undefined, Constant, Expression, Transition };
StyleProperty(Value value_, Kind kind_) : value(std::move(value_)), kind(kind_) {}
StyleProperty() = default;
- const Value value;
- const Kind kind = Kind::Undefined;
+ const Value& getValue() const { return value; }
+ Value& getValue() { return value; }
+ Kind getKind() const { return kind; }
+
+private:
+ Value value;
+ Kind kind = Kind::Undefined;
};
} // namespace style