Browse Source

imnor changes

Michele Caini 7 years ago
parent
commit
e301b9d399
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/entt/entity/sparse_set.hpp

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

@@ -178,7 +178,9 @@ class sparse_set<Entity> {
 
     auto index(Entity entt) const ENTT_NOEXCEPT {
         const auto identifier = entt & traits_type::entity_mask;
-        return std::make_pair(size_type(identifier / entt_per_page), size_type(identifier & (entt_per_page - 1)));
+        const auto page = size_type(identifier / entt_per_page);
+        const auto offset = size_type(identifier & (entt_per_page - 1));
+        return std::make_pair(page, offset);
     }
 
 public: