ソースを参照

storage: updated pointer type for storage iterator

Michele Caini 4 年 前
コミット
8e5a048913
1 ファイル変更1 行追加1 行削除
  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 {