From 7c23e4a2f66b00829feaba6082ed032a11246c52 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 14 Mar 2023 13:56:06 +0100 Subject: [PATCH] registry: minor changes --- src/entt/entity/registry.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 66366e791..8392a5a24 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -1240,7 +1240,7 @@ public: size_type next_len{}; for(auto &&data: groups) { - if((data.second.owned(type_hash>::value()) + ... + data.second.owned(type_hash>::value()))) { + if((data.second.owned(type_hash>::value()) || ... || data.second.owned(type_hash>::value()))) { if(const auto sz = data.second.handler->size(); sz < handler->size() && (prev == nullptr || prev_len < sz)) { prev = data.second.handler.get(); prev_len = sz; @@ -1350,7 +1350,7 @@ public: template [[nodiscard]] bool sortable(const basic_group, get_t, exclude_t> &) noexcept { constexpr auto size = sizeof...(Owned) + sizeof...(Get) + sizeof...(Exclude); - auto pred = [size](const auto &data) { return (0u + ... + data.second.owned(type_hash::value())) && (size < data.second.handler->size()); }; + auto pred = [size](const auto &data) { return (data.second.owned(type_hash::value()) || ...) && (size < data.second.handler->size()); }; return std::find_if(groups.cbegin(), groups.cend(), std::move(pred)) == groups.cend(); }