From a348ff7dd1b08914d255c7b661a4fa1fcfb4ae81 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 4 Oct 2024 11:50:24 +0200 Subject: [PATCH] storage: explicit checks --- src/entt/entity/storage.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 5d33999ed..fc7920832 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -374,7 +374,7 @@ protected: * @return Iterator pointing to the emplaced element. */ underlying_iterator try_emplace([[maybe_unused]] const Entity entt, [[maybe_unused]] const bool force_back, const void *value) override { - if(value) { + if(value != nullptr) { if constexpr(std::is_copy_constructible_v) { return emplace_element(entt, force_back, *static_cast(value)); } else {