Explorar el Código

suppress shadow warnings

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

+ 2 - 2
src/entt/entity/view.hpp

@@ -180,10 +180,10 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
     template<typename Comp, typename Func, typename... Other, typename... Type>
     void traverse(Func func, type_list<Other...>, type_list<Type...>) const {
         if constexpr(std::disjunction_v<std::is_same<Comp, Type>...>) {
-            auto raw = std::get<pool_type<Comp> *>(pools)->begin();
+            auto it = std::get<pool_type<Comp> *>(pools)->begin();
 
             for(const auto entt: static_cast<const sparse_set<entity_type> &>(*std::get<pool_type<Comp> *>(pools))) {
-                auto curr = raw++;
+                auto curr = it++;
 
                 if((std::get<pool_type<Other> *>(pools)->has(entt) && ...) && (!std::get<pool_type<Exclude> *>(pools)->has(entt) && ...)) {
                     if constexpr(std::is_invocable_v<Func, decltype(get<Type>({}))...>) {

+ 2 - 2
test/entt/entity/registry.cpp

@@ -12,8 +12,8 @@
 struct empty_type {};
 
 struct non_default_constructible {
-    non_default_constructible(int i): i{i} {}
-    int i;
+    non_default_constructible(int v): value{v} {}
+    int value;
 };
 
 struct listener {