ソースを参照

mixin: suppress a warning with gcc11

Michele Caini 3 年 前
コミット
cf61068dc0
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/entt/entity/mixin.hpp

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

@@ -49,11 +49,11 @@ class sigh_mixin final: public Type {
             ENTT_ASSERT(owner != nullptr, "Invalid pointer to registry");
 
             if(Type::policy() == deletion_policy::swap_and_pop) {
-                for(const auto entt: static_cast<typename Type::base_type &>(*this)) {
+                for(auto &&entt: static_cast<typename Type::base_type &>(*this)) {
                     destruction.publish(*owner, entt);
                 }
             } else {
-                for(const auto entt: static_cast<typename Type::base_type &>(*this)) {
+                for(auto &&entt: static_cast<typename Type::base_type &>(*this)) {
                     if(entt != tombstone) {
                         destruction.publish(*owner, entt);
                     }