Browse Source

view: updated ::refresh

Michele Caini 2 years ago
parent
commit
325ca310d3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/entt/entity/view.hpp

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

@@ -315,7 +315,7 @@ public:
 
 
     /*! @brief Updates the internal leading view if required. */
     /*! @brief Updates the internal leading view if required. */
     void refresh() noexcept {
     void refresh() noexcept {
-        if(std::apply([](const auto *...curr) { return ((curr != nullptr) && ...); }, pools)) {
+        if(view || std::apply([](const auto *...curr) { return ((curr != nullptr) && ...); }, pools)) {
             unchecked_refresh();
             unchecked_refresh();
         }
         }
     }
     }
@@ -372,7 +372,7 @@ public:
     void storage(Type &elem) noexcept {
     void storage(Type &elem) noexcept {
         if constexpr(Index < offset) {
         if constexpr(Index < offset) {
             std::get<Index>(pools) = &elem;
             std::get<Index>(pools) = &elem;
-            view ? unchecked_refresh() : refresh();
+            refresh();
         } else {
         } else {
             std::get<Index - offset>(filter) = &elem;
             std::get<Index - offset>(filter) = &elem;
         }
         }