summaryrefslogtreecommitdiff
path: root/src/mbgl/style/style.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/style.cpp')
-rw-r--r--src/mbgl/style/style.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index f083ca47b8..97d30b2494 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -87,7 +87,7 @@ Style::~Style() {
}
for (const auto& layer : layers) {
- if (CustomLayer* customLayer = layer->as<CustomLayer>()) {
+ if (auto* customLayer = layer->as<CustomLayer>()) {
customLayer->impl->deinitialize();
}
}
@@ -258,7 +258,7 @@ Layer* Style::addLayer(std::unique_ptr<Layer> layer, optional<std::string> befor
throw std::runtime_error(std::string{"Layer "} + layer->getID() + " already exists");
}
- if (CustomLayer* customLayer = layer->as<CustomLayer>()) {
+ if (auto* customLayer = layer->as<CustomLayer>()) {
customLayer->impl->initialize();
}
@@ -280,7 +280,7 @@ std::unique_ptr<Layer> Style::removeLayer(const std::string& id) {
auto layer = std::move(*it);
- if (CustomLayer* customLayer = layer->as<CustomLayer>()) {
+ if (auto* customLayer = layer->as<CustomLayer>()) {
customLayer->impl->deinitialize();
}