Skip to content

Commit 15fe6fe

Browse files
committed
storage: please the code coverage tool
1 parent 0d7c437 commit 15fe6fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/entt/entity/storage.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,14 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
316316
allocator_type allocator{get_allocator()};
317317
entt::uninitialized_construct_using_allocator(to_address(assure_at_least(to)), allocator, std::move(elem));
318318
alloc_traits::destroy(allocator, std::addressof(elem));
319-
return;
319+
} else {
320+
using std::swap;
321+
swap(elem, element_at(to));
320322
}
323+
} else {
324+
using std::swap;
325+
swap(elem, element_at(to));
321326
}
322-
323-
using std::swap;
324-
swap(elem, element_at(to));
325327
}
326328
}
327329

0 commit comments

Comments
 (0)