Răsfoiți Sursa

registry/storage: minor changes

Michele Caini 3 ani în urmă
părinte
comite
d2f4ffc433
2 a modificat fișierele cu 3 adăugiri și 4 ștergeri
  1. 2 2
      src/entt/entity/registry.hpp
  2. 1 2
      src/entt/entity/storage.hpp

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

@@ -53,12 +53,12 @@ public:
     constexpr storage_proxy_iterator() noexcept
     constexpr storage_proxy_iterator() noexcept
         : it{} {}
         : it{} {}
 
 
-    constexpr storage_proxy_iterator(const It iter) noexcept
+    constexpr storage_proxy_iterator(It iter) noexcept
         : it{iter} {}
         : it{iter} {}
 
 
     template<typename Other, typename = std::enable_if_t<!std::is_same_v<It, Other> && std::is_constructible_v<It, Other>>>
     template<typename Other, typename = std::enable_if_t<!std::is_same_v<It, Other> && std::is_constructible_v<It, Other>>>
     constexpr storage_proxy_iterator(const storage_proxy_iterator<Other> &other) noexcept
     constexpr storage_proxy_iterator(const storage_proxy_iterator<Other> &other) noexcept
-        : it{other.it} {}
+        : storage_proxy_iterator{other.it} {}
 
 
     constexpr storage_proxy_iterator &operator++() noexcept {
     constexpr storage_proxy_iterator &operator++() noexcept {
         return ++it, *this;
         return ++it, *this;

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

@@ -56,8 +56,7 @@ public:
 
 
     template<bool Const = std::is_const_v<Container>, typename = std::enable_if_t<Const>>
     template<bool Const = std::is_const_v<Container>, typename = std::enable_if_t<Const>>
     constexpr storage_iterator(const storage_iterator<std::remove_const_t<Container>> &other) noexcept
     constexpr storage_iterator(const storage_iterator<std::remove_const_t<Container>> &other) noexcept
-        : packed{other.packed},
-          offset{other.offset} {}
+        : storage_iterator{other.packed, other.offset} {}
 
 
     constexpr storage_iterator &operator++() noexcept {
     constexpr storage_iterator &operator++() noexcept {
         return --offset, *this;
         return --offset, *this;