summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-07-24 20:58:54 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-08-08 14:14:34 +0300
commit83bd4c213583058340d0606f2d24c85489091ccf (patch)
tree90086452ff7bd0d3bc58f8670b76e96df52d7d6a /src/mbgl/style
parent15a26231474d08e3884e424601b609c53d7ef086 (diff)
downloadqtlocation-mapboxgl-83bd4c213583058340d0606f2d24c85489091ccf.tar.gz
[core] Replace remaining dynamic_cast with static_cast
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/layers/circle_layer_impl.cpp2
-rw-r--r--src/mbgl/style/layers/fill_extrusion_layer_impl.cpp2
-rw-r--r--src/mbgl/style/layers/fill_layer_impl.cpp2
-rw-r--r--src/mbgl/style/layers/heatmap_layer_impl.cpp2
-rw-r--r--src/mbgl/style/layers/line_layer_impl.cpp2
-rw-r--r--src/mbgl/style/layers/symbol_layer_impl.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/style/layers/circle_layer_impl.cpp b/src/mbgl/style/layers/circle_layer_impl.cpp
index 69f574cd6b..358598e09c 100644
--- a/src/mbgl/style/layers/circle_layer_impl.cpp
+++ b/src/mbgl/style/layers/circle_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool CircleLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const CircleLayer::Impl*>(&other));
+ assert(other.type == LayerType::Circle);
const auto& impl = static_cast<const style::CircleLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||
diff --git a/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp b/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp
index d37c2ad29b..357ea3e973 100644
--- a/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp
+++ b/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool FillExtrusionLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const FillExtrusionLayer::Impl*>(&other));
+ assert(other.type == LayerType::FillExtrusion);
const auto& impl = static_cast<const style::FillExtrusionLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||
diff --git a/src/mbgl/style/layers/fill_layer_impl.cpp b/src/mbgl/style/layers/fill_layer_impl.cpp
index 0dc7ed14d5..a8ba1b693b 100644
--- a/src/mbgl/style/layers/fill_layer_impl.cpp
+++ b/src/mbgl/style/layers/fill_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool FillLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const FillLayer::Impl*>(&other));
+ assert(other.type == LayerType::Fill);
const auto& impl = static_cast<const style::FillLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||
diff --git a/src/mbgl/style/layers/heatmap_layer_impl.cpp b/src/mbgl/style/layers/heatmap_layer_impl.cpp
index af20888d9d..8fd0cf72b2 100644
--- a/src/mbgl/style/layers/heatmap_layer_impl.cpp
+++ b/src/mbgl/style/layers/heatmap_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool HeatmapLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const HeatmapLayer::Impl*>(&other));
+ assert(other.type == LayerType::Heatmap);
const auto& impl = static_cast<const style::HeatmapLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||
diff --git a/src/mbgl/style/layers/line_layer_impl.cpp b/src/mbgl/style/layers/line_layer_impl.cpp
index bee88d6a47..68cd3a8f49 100644
--- a/src/mbgl/style/layers/line_layer_impl.cpp
+++ b/src/mbgl/style/layers/line_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool LineLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const LineLayer::Impl*>(&other));
+ assert(other.type == LayerType::Line);
const auto& impl = static_cast<const style::LineLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||
diff --git a/src/mbgl/style/layers/symbol_layer_impl.cpp b/src/mbgl/style/layers/symbol_layer_impl.cpp
index b59768725d..753b2fa184 100644
--- a/src/mbgl/style/layers/symbol_layer_impl.cpp
+++ b/src/mbgl/style/layers/symbol_layer_impl.cpp
@@ -4,7 +4,7 @@ namespace mbgl {
namespace style {
bool SymbolLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const {
- assert(dynamic_cast<const SymbolLayer::Impl*>(&other));
+ assert(other.type == LayerType::Symbol);
const auto& impl = static_cast<const style::SymbolLayer::Impl&>(other);
return filter != impl.filter ||
visibility != impl.visibility ||