Browse Source

test: suppress a gcc sign-compare warning

Michele Caini 2 years ago
parent
commit
fdbb6829fa
1 changed files with 5 additions and 5 deletions
  1. 5 5
      test/entt/entity/registry.cpp

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

@@ -583,28 +583,28 @@ TEST(Registry, CreateClearCycle) {
     const std::size_t second_iteration = 7u;
     const std::size_t second_iteration = 7u;
     const std::size_t third_iteration = 5u;
     const std::size_t third_iteration = 5u;
 
 
-    for(int i = 0; i < first_iteration; ++i) {
+    for(std::size_t i{}; i < first_iteration; ++i) {
         const auto entity = registry.create();
         const auto entity = registry.create();
         registry.emplace<double>(entity);
         registry.emplace<double>(entity);
     }
     }
 
 
     registry.clear();
     registry.clear();
 
 
-    for(int i = 0; i < second_iteration; ++i) {
+    for(std::size_t i{}; i < second_iteration; ++i) {
         const auto entity = registry.create();
         const auto entity = registry.create();
         registry.emplace<int>(entity);
         registry.emplace<int>(entity);
 
 
-        if(i == 3) {
+        if(i == 3u) {
             pre = entity;
             pre = entity;
         }
         }
     }
     }
 
 
     registry.clear();
     registry.clear();
 
 
-    for(int i = 0; i < third_iteration; ++i) {
+    for(std::size_t i{}; i < third_iteration; ++i) {
         const auto entity = registry.create();
         const auto entity = registry.create();
 
 
-        if(i == 3) {
+        if(i == 3u) {
             post = entity;
             post = entity;
         }
         }
     }
     }