diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-10-29 14:29:16 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-10-31 11:22:46 +0200 |
commit | 56808731b699d7750726cd88dd06516c63d7f2f0 (patch) | |
tree | 7839dffdd0eec33f6ebd2cfa9195f7408ac6c289 /include/mbgl | |
parent | 3f314682fa2f2701c0d1c7e863013ce254a23afd (diff) | |
download | qtlocation-mapboxgl-56808731b699d7750726cd88dd06516c63d7f2f0.tar.gz |
Remove style::Layer::is()/as()
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/style/layer.hpp | 25 | ||||
-rw-r--r-- | include/mbgl/style/layers/background_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/circle_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/fill_extrusion_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/fill_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/heatmap_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/hillshade_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/layer.hpp.ejs | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/line_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/raster_layer.hpp | 5 | ||||
-rw-r--r-- | include/mbgl/style/layers/symbol_layer.hpp | 5 |
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 |