소스 검색

entity: simplified to_version

Michele Caini 4 년 전
부모
커밋
cb4142a97d
1개의 변경된 파일과 1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/entt/entity/entity.hpp

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

@@ -96,8 +96,7 @@ public:
      * @return The integral representation of the version part.
      */
     [[nodiscard]] static constexpr version_type to_version(const value_type value) ENTT_NOEXCEPT {
-        constexpr auto mask = (base_type::version_mask << base_type::entity_shift);
-        return ((to_integral(value) & mask) >> base_type::entity_shift);
+        return (to_integral(value) >> base_type::entity_shift);
     }
 
     /**