Michele Caini 6 năm trước cách đây
mục cha
commit
b4c30fc07b
1 tập tin đã thay đổi với 1 bổ sung4 xóa
  1. 1 4
      src/entt/entity/runtime_view.hpp

+ 1 - 4
src/entt/entity/runtime_view.hpp

@@ -78,10 +78,7 @@ class basic_runtime_view {
         }
 
         bool valid() const ENTT_NOEXCEPT {
-            const auto entt = *begin;
-            const auto sz = size_type(to_integer(entt) & traits_type::entity_mask);
-
-            return std::all_of(from, to, [entt](const auto *view) {
+            return std::all_of(from, to, [entt = *begin](const auto *view) {
                 return view->has(entt);
             });
         }