ソースを参照

suppress shadow warnings

Michele Caini 6 年 前
コミット
db8d9ebc72
2 ファイル変更4 行追加4 行削除
  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>
     template<typename Comp, typename Func, typename... Other, typename... Type>
     void traverse(Func func, type_list<Other...>, type_list<Type...>) const {
     void traverse(Func func, type_list<Other...>, type_list<Type...>) const {
         if constexpr(std::disjunction_v<std::is_same<Comp, Type>...>) {
         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))) {
             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((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>({}))...>) {
                     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 empty_type {};
 
 
 struct non_default_constructible {
 struct non_default_constructible {
-    non_default_constructible(int i): i{i} {}
-    int i;
+    non_default_constructible(int v): value{v} {}
+    int value;
 };
 };
 
 
 struct listener {
 struct listener {