Просмотр исходного кода

saprse_set: deprecate .at as ambiguous

Michele Caini 2 лет назад
Родитель
Сommit
776c541d1c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/entt/entity/sparse_set.hpp

+ 1 - 1
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;
     }