summaryrefslogtreecommitdiff
path: root/src/mbgl/style/property_parsing.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/property_parsing.hpp')
-rw-r--r--src/mbgl/style/property_parsing.hpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/mbgl/style/property_parsing.hpp b/src/mbgl/style/property_parsing.hpp
index 182636df5c..c4547a9e1e 100644
--- a/src/mbgl/style/property_parsing.hpp
+++ b/src/mbgl/style/property_parsing.hpp
@@ -1,11 +1,13 @@
#ifndef MBGL_PROPERTY_PARSING
#define MBGL_PROPERTY_PARSING
-#include <mbgl/style/class_properties.hpp>
+#include <mbgl/style/types.hpp>
#include <mapbox/optional.hpp>
#include <rapidjson/document.h>
+#include <functional>
+
namespace mbgl {
using JSVal = rapidjson::Value;
@@ -13,25 +15,9 @@ using JSVal = rapidjson::Value;
template <typename T>
using optional = mapbox::util::optional<T>;
-namespace detail {
-
template <typename T>
optional<T> parseProperty(const char* name, const JSVal&);
}
-template <typename T>
-void parseProperty(const char* name, PropertyKey key, ClassProperties& properties, const JSVal& value) {
- if (!value.HasMember(name))
- return;
-
- const optional<T> res = detail::parseProperty<T>(name, value[name]);
-
- if (res) {
- properties.set(key, *res);
- }
-}
-
-}
-
#endif