Răsfoiți Sursa

registry: minor changes

Michele Caini 5 ani în urmă
părinte
comite
65aa4e145e
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      src/entt/entity/registry.hpp

+ 3 - 3
src/entt/entity/registry.hpp

@@ -474,7 +474,7 @@ public:
         entity_type entt;
         entity_type entt;
 
 
         if(destroyed == null) {
         if(destroyed == null) {
-            entt = entities.emplace_back(entity_type(static_cast<typename traits_type::entity_type>(entities.size())));
+            entt = entities.emplace_back(entity_type{static_cast<typename traits_type::entity_type>(entities.size())});
             // traits_type::entity_mask is reserved to allow for null identifiers
             // traits_type::entity_mask is reserved to allow for null identifiers
             ENTT_ASSERT(to_integral(entt) < traits_type::entity_mask);
             ENTT_ASSERT(to_integral(entt) < traits_type::entity_mask);
         } else {
         } else {
@@ -507,7 +507,7 @@ public:
 
 
             for(auto pos = entities.size(); pos < req; ++pos) {
             for(auto pos = entities.size(); pos < req; ++pos) {
                 entities.emplace_back(destroyed);
                 entities.emplace_back(destroyed);
-                destroyed = entity_type(static_cast<typename traits_type::entity_type>(pos));
+                destroyed = entity_type{static_cast<typename traits_type::entity_type>(pos)};
             }
             }
 
 
             entt = entities.emplace_back(hint);
             entt = entities.emplace_back(hint);
@@ -562,7 +562,7 @@ public:
             if((to_integral(entities[pos]) & traits_type::entity_mask) != pos) {
             if((to_integral(entities[pos]) & traits_type::entity_mask) != pos) {
                 const auto version = to_integral(entities[pos]) & (traits_type::version_mask << traits_type::entity_shift);
                 const auto version = to_integral(entities[pos]) & (traits_type::version_mask << traits_type::entity_shift);
                 entities[pos] = entity_type{to_integral(destroyed) | version};
                 entities[pos] = entity_type{to_integral(destroyed) | version};
-                destroyed = entity_type(static_cast<typename traits_type::entity_type>(pos));
+                destroyed = entity_type{static_cast<typename traits_type::entity_type>(pos)};
             }
             }
         }
         }
     }
     }