entity: cleanup

This commit is contained in:
Michele Caini
2022-02-18 17:08:29 +01:00
parent 83f7e633a3
commit 380cb41ca9
2 changed files with 6 additions and 6 deletions

View File

@@ -755,7 +755,7 @@ public:
using std::swap;
swap(packed[from], packed[to]);
const auto entity = static_cast<typename entity_traits::entity_type>(to);
sparse_ref(packed[to]) = entity_traits::combine(entity, entity_traits::to_integral(packed[to]));
*it = entity_traits::combine(static_cast<typename entity_traits::entity_type>(from), entity_traits::reserved);

View File

@@ -855,11 +855,11 @@ public:
}
/**
* @brief Updates the instance assigned to a given entity in-place.
* @tparam Func Types of the function objects to invoke.
* @param entt A valid identifier.
* @param func Valid function objects.
*/
* @brief Updates the instance assigned to a given entity in-place.
* @tparam Func Types of the function objects to invoke.
* @param entt A valid identifier.
* @param func Valid function objects.
*/
template<typename... Func>
void patch([[maybe_unused]] const entity_type entt, Func &&...func) {
ENTT_ASSERT(base_type::contains(entt), "Storage does not contain entity");