Function contains

Synopsis

#include <src/entt/entity/group.hpp>

bool contains(const entity_type entt) const

Description

Checks if a group contains an entity.

Parameters

entt - A valid entity identifier.

Return
True if the group contains the given entity, false otherwise.

Source

Lines 788-790 in src/entt/entity/group.hpp.

[[nodiscard]] bool contains(const entity_type entt) const {
    return std::get<0>(pools)->contains(entt) && (std::get<0>(pools)->index(entt) < (*length));
}





Add Discussion

Log in to comment