diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-12-12 16:44:41 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-12-12 17:44:11 +0200 |
commit | 3bbea2e30c2a7942d16586c5dea770cccfba5ae0 (patch) | |
tree | fbd294d00afd3d773cab55c2f10379f29f03a6d7 /src/mbgl/style/collection.hpp | |
parent | 79768743d8d9f61303d653a515ed1d218b6e54f4 (diff) | |
download | qtlocation-mapboxgl-3bbea2e30c2a7942d16586c5dea770cccfba5ae0.tar.gz |
[core] Fix -Wshadow when using GCC 4.9
Diffstat (limited to 'src/mbgl/style/collection.hpp')
-rw-r--r-- | src/mbgl/style/collection.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/style/collection.hpp b/src/mbgl/style/collection.hpp index 91244cb711..7d67fac94f 100644 --- a/src/mbgl/style/collection.hpp +++ b/src/mbgl/style/collection.hpp @@ -63,12 +63,12 @@ class Collection<T, false /*persistentImplsOrder*/> : public CollectionBase<T> { public: T* add(std::unique_ptr<T> wrapper, const optional<std::string>& before = nullopt) { - std::size_t index = before ? Base::index(*before) : Base::size(); - return Base::add(index, index, std::move(wrapper)); + std::size_t idx = before ? Base::index(*before) : Base::size(); + return Base::add(idx, idx, std::move(wrapper)); } std::unique_ptr<T> remove(const std::string& id) { - std::size_t index = Base::index(id); - return Base::remove(index, index); + std::size_t idx = Base::index(id); + return Base::remove(idx, idx); } void update(const T& wrapper) { Base::update(Base::index(wrapper.getID()), wrapper); } }; |