Parcourir la source

fixed comments

Michele Caini il y a 7 ans
Parent
commit
2ec9043cf2
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      src/entt/entity/registry.hpp
  2. 2 2
      src/entt/entity/sparse_set.hpp

+ 1 - 1
src/entt/entity/registry.hpp

@@ -574,7 +574,7 @@ public:
      * Syntactic sugar for the following snippet:
      *
      * @code{.cpp}
-     * has<Tag>() && attachee<Tag>() == entity
+     * registry.has<Tag>() && registry.attachee<Tag>() == entity
      * @endcode
      *
      * @tparam Tag Type of tag for which to perform the check.

+ 2 - 2
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);
     }