Skip to content

Commit

Permalink
view: ::contains in_place support for single type views
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Jul 4, 2024
1 parent f32fd18 commit c791402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/entt/entity/view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class basic_storage_view {
* @return True if the view contains the given entity, false otherwise.
*/
[[nodiscard]] bool contains(const entity_type entt) const noexcept {
if constexpr(Policy == deletion_policy::swap_and_pop) {
if constexpr(Policy == deletion_policy::swap_and_pop || Policy == deletion_policy::in_place) {
return leading && leading->contains(entt);
} else {
static_assert(Policy == deletion_policy::swap_only, "Unexpected storage policy");
Expand Down

0 comments on commit c791402

Please sign in to comment.