From 99e89c2540d1ef40a3560367a0fb2213aa98552a Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 11 Aug 2020 16:52:06 +0200 Subject: [PATCH] registry: suppress warnings for shadow variables --- src/entt/entity/registry.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 2076ac651..d34c556db 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -1235,19 +1235,19 @@ public: template [[nodiscard]] basic_runtime_view runtime_view(ItComp first, ItComp last, ItExcl from = {}, ItExcl to = {}) const { std::vector *> component(std::distance(first, last)); - std::vector *> exclude(std::distance(from, to)); + std::vector *> filter(std::distance(from, to)); std::transform(first, last, component.begin(), [this](const auto ctype) { const auto it = std::find_if(pools.cbegin(), pools.cend(), [ctype](auto &&pdata) { return pdata.pool && pdata.type_id == ctype; }); return it == pools.cend() ? nullptr : it->pool.get(); }); - std::transform(from, to, exclude.begin(), [this](const auto ctype) { + std::transform(from, to, filter.begin(), [this](const auto ctype) { const auto it = std::find_if(pools.cbegin(), pools.cend(), [ctype](auto &&pdata) { return pdata.pool && pdata.type_id == ctype; }); return it == pools.cend() ? nullptr : it->pool.get(); }); - return { std::move(component), std::move(exclude) }; + return { std::move(component), std::move(filter) }; } /**