Skip to content

Commit

Permalink
storage: explicit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Oct 4, 2024
1 parent 1620b63 commit a348ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/entt/entity/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
* @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<element_type>) {
return emplace_element(entt, force_back, *static_cast<const element_type *>(value));
} else {
Expand Down

0 comments on commit a348ff7

Please sign in to comment.