diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index dbba30932..99d72a85e 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -574,7 +574,7 @@ public: * Syntactic sugar for the following snippet: * * @code{.cpp} - * has() && attachee() == entity + * registry.has() && registry.attachee() == entity * @endcode * * @tparam Tag Type of tag for which to perform the check. diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index 8f639d8e3..73e7490be 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -275,7 +275,7 @@ public: */ bool has(entity_type entity) const ENTT_NOEXCEPT { const auto pos = size_type(entity & traits_type::entity_mask); - // the in-use control bit permits to avoid accessing the direct vector + // testing against pending permits to avoid accessing the direct vector return (pos < reverse.size()) && (reverse[pos] != pending); } @@ -299,7 +299,7 @@ public: bool fast(entity_type entity) const ENTT_NOEXCEPT { const auto pos = size_type(entity & traits_type::entity_mask); assert(pos < reverse.size()); - // the in-use control bit permits to avoid accessing the direct vector + // testing against pending permits to avoid accessing the direct vector return (reverse[pos] != pending); }