diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index cc3abd726..c8bed1b4d 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -723,11 +723,9 @@ public: * comparison function should be equivalent to the following: * * @code{.cpp} - * bool(auto e1, auto e2) + * bool(const Component &, const Component &) * @endcode * - * Where `e1` and `e2` are valid entity identifiers. - * * @tparam Component Type of components to sort. * @tparam Compare Type of comparison function object. * @param compare A valid comparison function object. diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index edce3bbd5..2df07156d 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -517,13 +517,20 @@ public: * iterators returns them in the expected order. See `begin` and `end` for * more details. * + * The comparison function object must return `true` if the first element + * is _less_ than the second one, `false` otherwise. The signature of the + * comparison function should be equivalent to the following: + * + * @code{.cpp} + * bool(const Type &, const Type &) + * @endcode + * * @note * Attempting to iterate elements using the raw pointer returned by `data` * gives no guarantees on the order, even though `sort` has been invoked. * - * @tparam Compare Type of the comparison function. - * @param compare A comparison function whose signature shall be equivalent - * to: `bool(const Type &, const Type &)`. + * @tparam Compare Type of comparison function object. + * @param compare A valid comparison function object. */ template void sort(Compare compare) {