summaryrefslogtreecommitdiff
path: root/src/mbgl/style/style_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/style_layer.cpp')
-rw-r--r--src/mbgl/style/style_layer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mbgl/style/style_layer.cpp b/src/mbgl/style/style_layer.cpp
index 1a4354be27..705d9800b1 100644
--- a/src/mbgl/style/style_layer.cpp
+++ b/src/mbgl/style/style_layer.cpp
@@ -1,6 +1,5 @@
#include <mbgl/style/style_layer.hpp>
#include <mbgl/style/style_bucket.hpp>
-#include <mbgl/style/style_layer_group.hpp>
#include <mbgl/style/property_fallback.hpp>
#include <mbgl/util/interpolate.hpp>
@@ -32,7 +31,7 @@ void StyleLayer::setClasses(const std::vector<std::string> &class_names, const s
// Make sure that we also transition to the fallback value for keys that aren't changed by
// any applied classes.
- for (std::pair<const PropertyKey, AppliedClassProperties> &property_pair : appliedStyle) {
+ for (auto& property_pair : appliedStyle) {
const PropertyKey key = property_pair.first;
if (already_applied.find(key) != already_applied.end()) {
// This property has already been set by a previous class, so we don't need to
@@ -66,7 +65,7 @@ void StyleLayer::applyClassProperties(const ClassID class_id,
// Loop through all the properties in this style, and add transitions to them, if they're
// not already the most recent transition.
const ClassProperties &class_properties = style_it->second;
- for (const std::pair<PropertyKey, PropertyValue> &property_pair : class_properties) {
+ for (const auto& property_pair : class_properties) {
PropertyKey key = property_pair.first;
if (already_applied.find(key) != already_applied.end()) {
// This property has already been set by a previous class.
@@ -126,7 +125,7 @@ void StyleLayer::applyStyleProperty(PropertyKey key, T &target, const float z, c
AppliedClassProperties &applied = it->second;
// Iterate through all properties that we need to apply in order.
const PropertyEvaluator<T> evaluator(z, zoomHistory);
- for (AppliedClassProperty &property : applied.properties) {
+ for (auto& property : applied.properties) {
if (now >= property.begin) {
// We overwrite the current property with the new value.
target = mapbox::util::apply_visitor(evaluator, property.value);
@@ -144,7 +143,7 @@ void StyleLayer::applyTransitionedStyleProperty(PropertyKey key, T &target, cons
AppliedClassProperties &applied = it->second;
// Iterate through all properties that we need to apply in order.
const PropertyEvaluator<T> evaluator(z, zoomHistory);
- for (AppliedClassProperty &property : applied.properties) {
+ for (auto& property : applied.properties) {
if (now >= property.end) {
// We overwrite the current property with the new value.
target = mapbox::util::apply_visitor(evaluator, property.value);
@@ -250,7 +249,7 @@ void StyleLayer::updateProperties(float z, const std::chrono::steady_clock::time
}
bool StyleLayer::hasTransitions() const {
- for (const std::pair<PropertyKey, AppliedClassProperties> &pair : appliedStyle) {
+ for (const auto& pair : appliedStyle) {
if (pair.second.hasTransitions()) {
return true;
}