From cfcc6e10293f48bd2e4205d03cf35b9e14802f5c Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 16 Apr 2019 22:28:24 +0200 Subject: [PATCH] fix shadow warnigns and positive lambda explanation (#221) --- src/entt/entity/registry.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index d8d0cba1f..8c4dfc8fa 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -309,8 +309,8 @@ class basic_registry { { sizeof...(Get), sizeof...(Exclude) }, std::make_unique(), +[](const ENTT_ID_TYPE *other) { - const std::size_t types[] = { type()..., type()... }; - return std::equal(std::begin(types), std::end(types), other); + const std::size_t ctypes[] = { type()..., type()... }; + return std::equal(std::begin(ctypes), std::end(ctypes), other); } }; @@ -350,8 +350,8 @@ class basic_registry { { sizeof...(Owned), sizeof...(Get), sizeof...(Exclude) }, std::make_unique(), +[](const ENTT_ID_TYPE *other) { - const std::size_t types[] = { type()..., type()..., type()... }; - return std::equal(std::begin(types), std::end(types), other); + const std::size_t ctypes[] = { type()..., type()..., type()... }; + return std::equal(std::begin(ctypes), std::end(ctypes), other); }, +[](ENTT_ID_TYPE ctype) { return ((ctype == type()) || ...);