diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-02 17:31:24 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-02 17:31:24 +0200 |
commit | 415214d75927481570cc3bb9129ab343413a9578 (patch) | |
tree | f5d774ae1fd85afdc850c02bd9f4dca55a28613a /include | |
parent | 634bb175360b26e70f8e1ec929c09969734e3539 (diff) | |
download | qtlocation-mapboxgl-415214d75927481570cc3bb9129ab343413a9578.tar.gz |
correctly parse array properties like *-translate
Diffstat (limited to 'include')
-rw-r--r-- | include/llmr/style/style_parser.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/llmr/style/style_parser.hpp b/include/llmr/style/style_parser.hpp index 71aca68061..a1af11ef6a 100644 --- a/include/llmr/style/style_parser.hpp +++ b/include/llmr/style/style_parser.hpp @@ -65,13 +65,18 @@ private: // Parses optional properties into style class properties. template <typename T> - bool parseStyleProperty(const char *property_name, PropertyKey key, ClassProperties &klass, JSVal value); + bool parseOptionalProperty(const char *property_name, PropertyKey key, ClassProperties &klass, JSVal value); template <typename T> - bool parseStyleProperty(const char *property_name, T &target, JSVal value); + bool parseOptionalProperty(const char *property_name, const std::vector<PropertyKey> &keys, ClassProperties &klass, JSVal value); template <typename T> - std::tuple<bool, T> parseStyleProperty(JSVal value, const char *property_name); + bool parseOptionalProperty(const char *property_name, T &target, JSVal value); template <typename T> - bool parseStyleProperty(const char *property_name, const std::vector<PropertyKey> &keys, ClassProperties &klass, JSVal value); + bool setProperty(JSVal value, const char *property_name, PropertyKey key, ClassProperties &klass); + template <typename T> + bool setProperty(JSVal value, const char *property_name, T &target); + + template <typename T> + std::tuple<bool, T> parseProperty(JSVal value, const char *property_name); template <typename T> bool parseFunction(PropertyKey key, ClassProperties &klass, JSVal value); |