From ad64c849b8b63590000f9bdff375ad83b1aa3d19 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 26 Jan 2023 11:42:19 +0100 Subject: [PATCH] storage: suppress warnings --- src/entt/entity/storage.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 29eba29ea..bc5a151ed 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -949,7 +949,10 @@ protected: if(const auto pos = base_type::index(*first); pos < length) { const auto vers = local_traits_type::to_version(*first) + 1; base_type::bump(local_traits_type::construct(local_traits_type::to_entity(*first), static_cast(vers + (vers == local_traits_type::to_version(tombstone))))); - (pos == --length) || (base_type::swap_at(pos, length), true); + + if (pos != --length) { + base_type::swap_at(pos, length); + } } } }