|
|
@@ -264,11 +264,11 @@ class basic_registry {
|
|
|
|
|
|
template<typename Type>
|
|
|
void maybe_valid_if(basic_registry &owner, const Entity entt) {
|
|
|
- [[maybe_unused]] const auto cpools = std::forward_as_tuple(owner.assure<Owned>()...);
|
|
|
+ [[maybe_unused]] const auto cpools = std::forward_as_tuple(owner.storage<Owned>()...);
|
|
|
|
|
|
const auto is_valid = ((std::is_same_v<Type, Owned> || std::get<storage_for_type<Owned> &>(cpools).contains(entt)) && ...)
|
|
|
- && ((std::is_same_v<Type, Get> || owner.assure<Get>().contains(entt)) && ...)
|
|
|
- && ((std::is_same_v<Type, Exclude> || !owner.assure<Exclude>().contains(entt)) && ...);
|
|
|
+ && ((std::is_same_v<Type, Get> || owner.storage<Get>().contains(entt)) && ...)
|
|
|
+ && ((std::is_same_v<Type, Exclude> || !owner.storage<Exclude>().contains(entt)) && ...);
|
|
|
|
|
|
if constexpr(sizeof...(Owned) == 0) {
|
|
|
if(is_valid && !current.contains(entt)) {
|
|
|
@@ -286,7 +286,7 @@ class basic_registry {
|
|
|
if constexpr(sizeof...(Owned) == 0) {
|
|
|
current.remove(entt);
|
|
|
} else {
|
|
|
- if(const auto cpools = std::forward_as_tuple(owner.assure<Owned>()...); std::get<0>(cpools).contains(entt) && (std::get<0>(cpools).index(entt) < current)) {
|
|
|
+ if(const auto cpools = std::forward_as_tuple(owner.storage<Owned>()...); std::get<0>(cpools).contains(entt) && (std::get<0>(cpools).index(entt) < current)) {
|
|
|
const auto pos = --current;
|
|
|
(std::get<storage_for_type<Owned> &>(cpools).swap_elements(std::get<storage_for_type<Owned> &>(cpools).data()[pos], entt), ...);
|
|
|
}
|