diff options
author | Jason Wray <jason@mapbox.com> | 2017-12-01 19:23:31 -0500 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-12-05 12:09:51 -0500 |
commit | 142b1f18eb1ea185abc5bcad09570d4e999518d9 (patch) | |
tree | 412425ce4faf07f31a96f67cad8d564f67e737db | |
parent | 7bf5c6bc4c4b5ce77a0fca7b4f4c3014374fc2f8 (diff) | |
download | qtlocation-mapboxgl-upstream/fb-xcode-9.1.tar.gz |
[core] Fix copy in range-based for loopsupstream/fb-xcode-9.1
Caught by `CLANG_WARN_RANGE_LOOP_ANALYSIS = YES`.
-rw-r--r-- | include/mbgl/style/expression/interpolate.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/style/function/convert.hpp | 2 |
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) |