summaryrefslogtreecommitdiff
path: root/src/mbgl/style/function/categorical_stops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/function/categorical_stops.cpp')
-rw-r--r--src/mbgl/style/function/categorical_stops.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/mbgl/style/function/categorical_stops.cpp b/src/mbgl/style/function/categorical_stops.cpp
deleted file mode 100644
index dd179f5376..0000000000
--- a/src/mbgl/style/function/categorical_stops.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <mbgl/style/function/categorical_stops.hpp>
-#include <mbgl/style/types.hpp>
-#include <mbgl/util/color.hpp>
-
-#include <array>
-
-namespace mbgl {
-namespace style {
-
-optional<CategoricalValue> categoricalValue(const Value& value) {
- return value.match(
- [] (bool t) { return optional<CategoricalValue>(t); },
- [] (uint64_t t) { return optional<CategoricalValue>(int64_t(t)); },
- [] (int64_t t) { return optional<CategoricalValue>(t); },
- [] (double t) { return optional<CategoricalValue>(int64_t(t)); },
- [] (const std::string& t) { return optional<CategoricalValue>(t); },
- [] (const auto&) { return optional<CategoricalValue>(); }
- );
-}
-
-template <class T>
-optional<T> CategoricalStops<T>::evaluate(const Value& value) const {
- auto v = categoricalValue(value);
- if (!v) {
- return {};
- }
- auto it = stops.find(*v);
- return it == stops.end() ? optional<T>() : it->second;
-}
-
-template class CategoricalStops<float>;
-template class CategoricalStops<Color>;
-template class CategoricalStops<std::array<float, 2>>;
-template class CategoricalStops<std::string>;
-template class CategoricalStops<TextTransformType>;
-template class CategoricalStops<TextJustifyType>;
-template class CategoricalStops<SymbolAnchorType>;
-template class CategoricalStops<LineJoinType>;
-
-} // namespace style
-} // namespace mbgl