Procházet zdrojové kódy

table: fixed table_iterator operator[](value)

Michele Caini před 2 roky
rodič
revize
e44b1e9024
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/entt/entity/table.hpp

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

@@ -78,7 +78,7 @@ struct table_iterator {
     }
     }
 
 
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
-        return std::forward_as_tuple(*std::get<It>(it)...);
+        return std::forward_as_tuple(std::get<It>(it)[value]...);
     }
     }
 
 
     [[nodiscard]] constexpr pointer operator->() const noexcept {
     [[nodiscard]] constexpr pointer operator->() const noexcept {