From 2ec9043cf2fb199c78a1d5747effcd7d47646c6c Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 4 May 2018 15:43:14 +0200 Subject: [PATCH] fixed comments --- src/entt/entity/registry.hpp | 2 +- src/entt/entity/sparse_set.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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); }