summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2018-11-01 17:07:39 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2018-11-19 14:06:21 +0200
commite59110d5862eba88b7112d0bcc0593485d465db8 (patch)
tree4ef597a6375e59b935879c5926665ea96667d84f /src
parent77911f1cc955b1adeb143dd15f6fc0d77763440c (diff)
downloadqtlocation-mapboxgl-e59110d5862eba88b7112d0bcc0593485d465db8.tar.gz
[core] Remove RenderLayer's is<> as<> methods
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/layers/render_background_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_circle_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_custom_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_fill_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_heatmap_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_hillshade_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_line_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_raster_layer.hpp5
-rw-r--r--src/mbgl/renderer/layers/render_symbol_layer.hpp5
-rw-r--r--src/mbgl/renderer/render_layer.hpp15
11 files changed, 0 insertions, 65 deletions
diff --git a/src/mbgl/renderer/layers/render_background_layer.hpp b/src/mbgl/renderer/layers/render_background_layer.hpp
index fef9ad97b4..fea3890484 100644
--- a/src/mbgl/renderer/layers/render_background_layer.hpp
+++ b/src/mbgl/renderer/layers/render_background_layer.hpp
@@ -29,9 +29,4 @@ private:
CrossfadeParameters crossfade;
};
-template <>
-inline bool RenderLayer::is<RenderBackgroundLayer>() const {
- return type == style::LayerType::Background;
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/layers/render_circle_layer.hpp b/src/mbgl/renderer/layers/render_circle_layer.hpp
index 678aeb102f..5515aa0452 100644
--- a/src/mbgl/renderer/layers/render_circle_layer.hpp
+++ b/src/mbgl/renderer/layers/render_circle_layer.hpp
@@ -34,11 +34,6 @@ public:
const style::CircleLayer::Impl& impl() const;
};
-template <>
-inline bool RenderLayer::is<RenderCircleLayer>() const {
- return type == style::LayerType::Circle;
-}
-
inline const RenderCircleLayer* toRenderCircleLayer(const RenderLayer* layer) {
return static_cast<const RenderCircleLayer*>(layer);
}
diff --git a/src/mbgl/renderer/layers/render_custom_layer.hpp b/src/mbgl/renderer/layers/render_custom_layer.hpp
index 958f8bfd3f..a6c1696493 100644
--- a/src/mbgl/renderer/layers/render_custom_layer.hpp
+++ b/src/mbgl/renderer/layers/render_custom_layer.hpp
@@ -26,9 +26,4 @@ private:
std::shared_ptr<style::CustomLayerHost> host;
};
-template <>
-inline bool RenderLayer::is<RenderCustomLayer>() const {
- return type == style::LayerType::Custom;
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp b/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
index a7d128dc08..481c394fbd 100644
--- a/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
+++ b/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
@@ -51,11 +51,6 @@ private:
CrossfadeParameters crossfade;
};
-template <>
-inline bool RenderLayer::is<RenderFillExtrusionLayer>() const {
- return type == style::LayerType::FillExtrusion;
-}
-
inline const RenderFillExtrusionLayer* toRenderFillExtrusionLayer(const RenderLayer* layer) {
return static_cast<const RenderFillExtrusionLayer*>(layer);
}
diff --git a/src/mbgl/renderer/layers/render_fill_layer.hpp b/src/mbgl/renderer/layers/render_fill_layer.hpp
index 48168a6234..6ce90be4a3 100644
--- a/src/mbgl/renderer/layers/render_fill_layer.hpp
+++ b/src/mbgl/renderer/layers/render_fill_layer.hpp
@@ -46,11 +46,6 @@ private:
};
-template <>
-inline bool RenderLayer::is<RenderFillLayer>() const {
- return type == style::LayerType::Fill;
-}
-
inline const RenderFillLayer* toRenderFillLayer(const RenderLayer* layer) {
return static_cast<const RenderFillLayer*>(layer);
}
diff --git a/src/mbgl/renderer/layers/render_heatmap_layer.hpp b/src/mbgl/renderer/layers/render_heatmap_layer.hpp
index c2d2dcaa3b..a0148fb4a3 100644
--- a/src/mbgl/renderer/layers/render_heatmap_layer.hpp
+++ b/src/mbgl/renderer/layers/render_heatmap_layer.hpp
@@ -44,11 +44,6 @@ private:
void updateColorRamp();
};
-template <>
-inline bool RenderLayer::is<RenderHeatmapLayer>() const {
- return type == style::LayerType::Heatmap;
-}
-
inline const RenderHeatmapLayer* toRenderHeatmapLayer(const RenderLayer* layer) {
return static_cast<const RenderHeatmapLayer*>(layer);
}
diff --git a/src/mbgl/renderer/layers/render_hillshade_layer.hpp b/src/mbgl/renderer/layers/render_hillshade_layer.hpp
index f88f1cd12f..3f3ddaccf0 100644
--- a/src/mbgl/renderer/layers/render_hillshade_layer.hpp
+++ b/src/mbgl/renderer/layers/render_hillshade_layer.hpp
@@ -31,9 +31,4 @@ private:
const std::array<float, 2> getLight(const PaintParameters& parameters);
};
-template <>
-inline bool RenderLayer::is<RenderHillshadeLayer>() const {
- return type == style::LayerType::Hillshade;
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/layers/render_line_layer.hpp b/src/mbgl/renderer/layers/render_line_layer.hpp
index 737aa2e5bc..5819484a2c 100644
--- a/src/mbgl/renderer/layers/render_line_layer.hpp
+++ b/src/mbgl/renderer/layers/render_line_layer.hpp
@@ -66,11 +66,6 @@ private:
optional<gl::Texture> colorRampTexture;
};
-template <>
-inline bool RenderLayer::is<RenderLineLayer>() const {
- return type == style::LayerType::Line;
-}
-
inline const RenderLineLayer* toRenderLineLayer(const RenderLayer* layer) {
return static_cast<const RenderLineLayer*>(layer);
}
diff --git a/src/mbgl/renderer/layers/render_raster_layer.hpp b/src/mbgl/renderer/layers/render_raster_layer.hpp
index a8633c4d5e..7783d924b7 100644
--- a/src/mbgl/renderer/layers/render_raster_layer.hpp
+++ b/src/mbgl/renderer/layers/render_raster_layer.hpp
@@ -27,9 +27,4 @@ public:
const style::RasterLayer::Impl& impl() const;
};
-template <>
-inline bool RenderLayer::is<RenderRasterLayer>() const {
- return type == style::LayerType::Raster;
-}
-
} // namespace mbgl
diff --git a/src/mbgl/renderer/layers/render_symbol_layer.hpp b/src/mbgl/renderer/layers/render_symbol_layer.hpp
index 105754befa..832fb94001 100644
--- a/src/mbgl/renderer/layers/render_symbol_layer.hpp
+++ b/src/mbgl/renderer/layers/render_symbol_layer.hpp
@@ -101,11 +101,6 @@ protected:
void sortRenderTiles(const TransformState&) final;
};
-template <>
-inline bool RenderLayer::is<RenderSymbolLayer>() const {
- return type == style::LayerType::Symbol;
-}
-
inline const RenderSymbolLayer* toRenderSymbolLayer(const RenderLayer* layer) {
return static_cast<const RenderSymbolLayer*>(layer);
}
diff --git a/src/mbgl/renderer/render_layer.hpp b/src/mbgl/renderer/render_layer.hpp
index 349b5d412a..a92d8f5aff 100644
--- a/src/mbgl/renderer/render_layer.hpp
+++ b/src/mbgl/renderer/render_layer.hpp
@@ -47,21 +47,6 @@ public:
// Returns instance of RenderLayerSymbolInterface if RenderLayer supports it.
virtual const RenderLayerSymbolInterface* getSymbolInterface() const;
- // 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;
- }
-
const std::string& getID() const;
// Checks whether this layer needs to be rendered in the given render pass.