Sfoglia il codice sorgente

added [[maybe_unused]] to suppress a warning from GCC

Michele Caini 6 anni fa
parent
commit
5717dbda4f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/entt/entity/group.hpp

+ 1 - 1
src/entt/entity/group.hpp

@@ -840,7 +840,7 @@ public:
 
 
         for(auto next = *length; next; --next) {
         for(auto next = *length; next; --next) {
             const auto pos = next - 1;
             const auto pos = next - 1;
-            const auto entt = cpool->data()[pos];
+            [[maybe_unused]] const auto entt = cpool->data()[pos];
             (std::get<pool_type<Other> *>(pools)->swap(pos, std::get<pool_type<Other> *>(pools)->index(entt)), ...);
             (std::get<pool_type<Other> *>(pools)->swap(pos, std::get<pool_type<Other> *>(pools)->index(entt)), ...);
         }
         }
     }
     }