Explorar el Código

entity: avoid unnecessary operations

Michele Caini hace 2 años
padre
commit
5b2c136a7c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entt/entity/entity.hpp

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

@@ -124,7 +124,7 @@ public:
      */
      */
     [[nodiscard]] static constexpr value_type next(const value_type value) noexcept {
     [[nodiscard]] static constexpr value_type next(const value_type value) noexcept {
         const auto vers = to_version(value) + 1;
         const auto vers = to_version(value) + 1;
-        return construct(to_entity(value), static_cast<version_type>(vers + (vers == version_mask)));
+        return construct(to_integral(value), static_cast<version_type>(vers + (vers == version_mask)));
     }
     }
 
 
     /**
     /**