summaryrefslogtreecommitdiff
path: root/include/mbgl/style
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-29 14:29:16 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-30 16:23:31 +0200
commit99e1a8a3df1a08464d8529b6988c1665b87c7c8b (patch)
tree4d45675ef4b54d00d7ef2a4dccbc211522515dce /include/mbgl/style
parent2ef9580565e2125e07124d23c0bcf400c8736931 (diff)
downloadqtlocation-mapboxgl-99e1a8a3df1a08464d8529b6988c1665b87c7c8b.tar.gz
Remove style::Layer::is()/as()upstream/mikhail_drop_style_layer_cast
Diffstat (limited to 'include/mbgl/style')
-rw-r--r--include/mbgl/style/layer.hpp25
-rw-r--r--include/mbgl/style/layers/background_layer.hpp5
-rw-r--r--include/mbgl/style/layers/circle_layer.hpp5
-rw-r--r--include/mbgl/style/layers/fill_extrusion_layer.hpp5
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp5
-rw-r--r--include/mbgl/style/layers/heatmap_layer.hpp5
-rw-r--r--include/mbgl/style/layers/hillshade_layer.hpp5
-rw-r--r--include/mbgl/style/layers/layer.hpp.ejs5
-rw-r--r--include/mbgl/style/layers/line_layer.hpp5
-rw-r--r--include/mbgl/style/layers/raster_layer.hpp5
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp5
11 files changed, 0 insertions, 75 deletions
diff --git a/include/mbgl/style/layer.hpp b/include/mbgl/style/layer.hpp
index dd8f1a1e0e..5f12115f87 100644
--- a/include/mbgl/style/layer.hpp
+++ b/include/mbgl/style/layer.hpp
@@ -15,16 +15,6 @@
namespace mbgl {
namespace style {
-class FillLayer;
-class LineLayer;
-class CircleLayer;
-class SymbolLayer;
-class RasterLayer;
-class HillshadeLayer;
-class BackgroundLayer;
-class CustomLayer;
-class FillExtrusionLayer;
-class HeatmapLayer;
class LayerObserver;
class Filter;
@@ -51,21 +41,6 @@ public:
virtual ~Layer();
- // Check whether this layer is of the given subtype.
- template <class T>
- bool is() const;
-
- // Dynamically cast this layer to the given subtype.
- template <class T>
- T* as() {
- return is<T>() ? reinterpret_cast<T*>(this) : nullptr;
- }
-
- template <class T>
- const T* as() const {
- return is<T>() ? reinterpret_cast<const T*>(this) : nullptr;
- }
-
LayerType getType() const;
std::string getID() const;
// Source
diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp
index 7d7753cbff..6739973e53 100644
--- a/include/mbgl/style/layers/background_layer.hpp
+++ b/include/mbgl/style/layers/background_layer.hpp
@@ -56,10 +56,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<BackgroundLayer>() const {
- return getType() == LayerType::Background;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp
index 909412dbab..e0a121e2dc 100644
--- a/include/mbgl/style/layers/circle_layer.hpp
+++ b/include/mbgl/style/layers/circle_layer.hpp
@@ -104,10 +104,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<CircleLayer>() const {
- return getType() == LayerType::Circle;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_extrusion_layer.hpp b/include/mbgl/style/layers/fill_extrusion_layer.hpp
index 8798738d90..ed1cbb924b 100644
--- a/include/mbgl/style/layers/fill_extrusion_layer.hpp
+++ b/include/mbgl/style/layers/fill_extrusion_layer.hpp
@@ -80,10 +80,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<FillExtrusionLayer>() const {
- return getType() == LayerType::FillExtrusion;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
index 033b451abc..b265bf5d06 100644
--- a/include/mbgl/style/layers/fill_layer.hpp
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -80,10 +80,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<FillLayer>() const {
- return getType() == LayerType::Fill;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/heatmap_layer.hpp b/include/mbgl/style/layers/heatmap_layer.hpp
index 2315eac3f2..5069eef165 100644
--- a/include/mbgl/style/layers/heatmap_layer.hpp
+++ b/include/mbgl/style/layers/heatmap_layer.hpp
@@ -69,10 +69,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<HeatmapLayer>() const {
- return getType() == LayerType::Heatmap;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/hillshade_layer.hpp b/include/mbgl/style/layers/hillshade_layer.hpp
index 4c18b5ed89..5c2b4276c3 100644
--- a/include/mbgl/style/layers/hillshade_layer.hpp
+++ b/include/mbgl/style/layers/hillshade_layer.hpp
@@ -74,10 +74,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<HillshadeLayer>() const {
- return getType() == LayerType::Hillshade;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs
index f6dd08000a..a5d4be14e6 100644
--- a/include/mbgl/style/layers/layer.hpp.ejs
+++ b/include/mbgl/style/layers/layer.hpp.ejs
@@ -72,10 +72,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<<%- camelize(type) %>Layer>() const {
- return getType() == LayerType::<%- camelize(type) %>;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp
index 0e1d026e74..487fef5837 100644
--- a/include/mbgl/style/layers/line_layer.hpp
+++ b/include/mbgl/style/layers/line_layer.hpp
@@ -125,10 +125,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<LineLayer>() const {
- return getType() == LayerType::Line;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp
index 2d10d65914..a31a362f49 100644
--- a/include/mbgl/style/layers/raster_layer.hpp
+++ b/include/mbgl/style/layers/raster_layer.hpp
@@ -86,10 +86,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<RasterLayer>() const {
- return getType() == LayerType::Raster;
-}
-
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
index b75a943be0..39852aa715 100644
--- a/include/mbgl/style/layers/symbol_layer.hpp
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -274,10 +274,5 @@ protected:
Mutable<Layer::Impl> mutableBaseImpl() const final;
};
-template <>
-inline bool Layer::is<SymbolLayer>() const {
- return getType() == LayerType::Symbol;
-}
-
} // namespace style
} // namespace mbgl