From 776c541d1c6ba1874b97f2b7fbf55dba901fe6d3 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 1 Jan 2024 16:39:33 +0100 Subject: [PATCH] saprse_set: deprecate .at as ambiguous --- src/entt/entity/sparse_set.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index a16339c84..5fbeac416 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -754,7 +754,7 @@ public: * @param pos The position for which to return the entity. * @return The entity at specified location if any, a null entity otherwise. */ - [[nodiscard]] entity_type at(const size_type pos) const noexcept { + [[deprecated("use .begin()[pos] instead")]] [[nodiscard]] entity_type at(const size_type pos) const noexcept { return pos < packed.size() ? packed[pos] : null; }