summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-01-30 16:50:38 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-01-30 17:28:31 +0100
commit8faee2554692ae13da5fbb68d3eef2ebb09a0c86 (patch)
tree10cac7d1e55bc41204ad5b90756bd7dd8f1b5e4e
parentce37879231514cfc60e66454ca493c2d76765318 (diff)
downloadqtlocation-mapboxgl-8faee2554692ae13da5fbb68d3eef2ebb09a0c86.tar.gz
[core] change loop variable type to auto
We used `const std::pair<T, std::shared_ptr<Expression>>`, but the actual type is `const std::pair<const T, std::shared_ptr<Expression>>` which resulted in an implicit copy
-rw-r--r--src/mbgl/style/expression/match.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/match.cpp b/src/mbgl/style/expression/match.cpp
index 0f05001a97..93627e9df1 100644
--- a/src/mbgl/style/expression/match.cpp
+++ b/src/mbgl/style/expression/match.cpp
@@ -11,7 +11,7 @@ namespace expression {
template <typename T>
void Match<T>::eachChild(const std::function<void(const Expression&)>& visit) const {
visit(*input);
- for (const std::pair<T, std::shared_ptr<Expression>>& branch : branches) {
+ for (const auto& branch : branches) {
visit(*branch.second);
}
visit(*otherwise);