Przeglądaj źródła

view: make unchecked_refresh private as it should be

Michele Caini 1 rok temu
rodzic
commit
a5e5fded0b
1 zmienionych plików z 12 dodań i 12 usunięć
  1. 12 12
      src/entt/entity/view.hpp

+ 12 - 12
src/entt/entity/view.hpp

@@ -223,6 +223,18 @@ class basic_common_view {
         return len[view->policy() == deletion_policy::swap_only];
     }
 
+    void unchecked_refresh() noexcept {
+        index = 0u;
+
+        if constexpr(Get > 1u) {
+            for(size_type pos{1u}; pos < Get; ++pos) {
+                if(pools[pos]->size() < pools[index]->size()) {
+                    index = pos;
+                }
+            }
+        }
+    }
+
 protected:
     /*! @cond TURN_OFF_DOXYGEN */
     basic_common_view() noexcept = default;
@@ -237,18 +249,6 @@ protected:
     void use(const std::size_t pos) noexcept {
         index = (index != Get) ? pos : Get;
     }
-
-    void unchecked_refresh() noexcept {
-        index = 0u;
-
-        if constexpr(Get > 1u) {
-            for(size_type pos{1u}; pos < Get; ++pos) {
-                if(pools[pos]->size() < pools[index]->size()) {
-                    index = pos;
-                }
-            }
-        }
-    }
     /*! @endcond */
 
 public: