Function front

Synopsis

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

entity_type front() const

Description

Returns the first entity of the group, if any.

Return
The first entity of the group if one exists, the null entity otherwise.

Source

Lines 748-751 in src/entt/entity/group.hpp.

[[nodiscard]] entity_type front() const {
    const auto it = begin();
    return it != end() ? *it : null;
}





Add Discussion

Log in to comment