Sfoglia il codice sorgente

storage: updated pointer type for storage iterator

Michele Caini 5 anni fa
parent
commit
8e5a048913
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/entt/entity/storage.hpp

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

@@ -158,7 +158,7 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
 
         [[nodiscard]] pointer operator->() const ENTT_NOEXCEPT {
             const auto pos = size_type(index-1u);
-            return &(*packed)[page(pos)][offset(pos)];
+            return std::addressof((*packed)[page(pos)][offset(pos)]);
         }
 
         [[nodiscard]] reference operator*() const ENTT_NOEXCEPT {