瀏覽代碼

entity: avoid unnecessary operations

Michele Caini 2 年之前
父節點
當前提交
5b2c136a7c
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 {
         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)));
     }
 
     /**