summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2017-12-01 19:23:31 -0500
committerJason Wray <jason@mapbox.com>2017-12-15 19:21:44 -0500
commit7ece4f6280657e429d840a76438c2fe1ceee6885 (patch)
treeba4d3233891e9555e4c2caa3ec4bab8e20a913fd /include/mbgl
parentf71ba9907c4d67becbaff6d7268f916f387e1b43 (diff)
downloadqtlocation-mapboxgl-7ece4f6280657e429d840a76438c2fe1ceee6885.tar.gz
[core] Fix copy in range-based for loops
Caught by `CLANG_WARN_RANGE_LOOP_ANALYSIS = YES`.
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/style/expression/interpolate.hpp2
-rw-r--r--include/mbgl/style/function/convert.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/mbgl/style/expression/interpolate.hpp b/include/mbgl/style/expression/interpolate.hpp
index 2dcb5a32a4..439122f91c 100644
--- a/include/mbgl/style/expression/interpolate.hpp
+++ b/include/mbgl/style/expression/interpolate.hpp
@@ -73,7 +73,7 @@ public:
void eachChild(const std::function<void(const Expression&)>& visit) const override {
visit(*input);
- for (const std::pair<const double, const std::unique_ptr<Expression>&>& stop : stops) {
+ for (const auto& stop : stops) {
visit(*stop.second);
}
}
diff --git a/include/mbgl/style/function/convert.hpp b/include/mbgl/style/function/convert.hpp
index ed35b4bf14..9f7b7ed1f8 100644
--- a/include/mbgl/style/function/convert.hpp
+++ b/include/mbgl/style/function/convert.hpp
@@ -174,7 +174,7 @@ struct Convert {
template <typename T>
static std::map<double, std::unique_ptr<Expression>> convertStops(const std::map<float, T>& stops) {
std::map<double, std::unique_ptr<Expression>> convertedStops;
- for(const std::pair<float, T>& stop : stops) {
+ for(const auto& stop : stops) {
convertedStops.emplace(
stop.first,
makeLiteral(stop.second)