Explorar el Código

fix shadow warnigns and positive lambda explanation (#221)

Michele Caini hace 6 años
padre
commit
cfcc6e1029
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      src/entt/entity/registry.hpp

+ 4 - 4
src/entt/entity/registry.hpp

@@ -309,8 +309,8 @@ class basic_registry {
                     { sizeof...(Get), sizeof...(Exclude) },
                     { sizeof...(Get), sizeof...(Exclude) },
                     std::make_unique<group_type>(),
                     std::make_unique<group_type>(),
                     +[](const ENTT_ID_TYPE *other) {
                     +[](const ENTT_ID_TYPE *other) {
-                        const std::size_t types[] = { type<Get>()..., type<Exclude>()... };
-                        return std::equal(std::begin(types), std::end(types), other);
+                        const std::size_t ctypes[] = { type<Get>()..., type<Exclude>()... };
+                        return std::equal(std::begin(ctypes), std::end(ctypes), other);
                     }
                     }
                 };
                 };
 
 
@@ -350,8 +350,8 @@ class basic_registry {
                     { sizeof...(Owned), sizeof...(Get), sizeof...(Exclude) },
                     { sizeof...(Owned), sizeof...(Get), sizeof...(Exclude) },
                     std::make_unique<group_type>(),
                     std::make_unique<group_type>(),
                     +[](const ENTT_ID_TYPE *other) {
                     +[](const ENTT_ID_TYPE *other) {
-                        const std::size_t types[] = { type<Owned>()..., type<Get>()..., type<Exclude>()... };
-                        return std::equal(std::begin(types), std::end(types), other);
+                        const std::size_t ctypes[] = { type<Owned>()..., type<Get>()..., type<Exclude>()... };
+                        return std::equal(std::begin(ctypes), std::end(ctypes), other);
                     },
                     },
                     +[](ENTT_ID_TYPE ctype) {
                     +[](ENTT_ID_TYPE ctype) {
                         return ((ctype == type<Owned>()) || ...);
                         return ((ctype == type<Owned>()) || ...);