Explorar el Código

sparse_set: const correctness

Michele Caini hace 2 años
padre
commit
c3bf842f9f
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/entt/entity/sparse_set.hpp

+ 3 - 3
src/entt/entity/sparse_set.hpp

@@ -610,7 +610,7 @@ public:
      *
      * @return An iterator to the first entity of the sparse set.
      */
-    [[nodiscard]] const_iterator begin() const noexcept {
+    [[nodiscard]] iterator begin() const noexcept {
         const auto pos = static_cast<typename iterator::difference_type>(packed.size());
         return iterator{packed, pos};
     }
@@ -643,7 +643,7 @@ public:
      * @return An iterator to the first entity of the reversed internal packed
      * array.
      */
-    [[nodiscard]] const_reverse_iterator rbegin() const noexcept {
+    [[nodiscard]] reverse_iterator rbegin() const noexcept {
         return std::make_reverse_iterator(end());
     }
 
@@ -672,7 +672,7 @@ public:
      * @return An iterator to the given entity if it's found, past the end
      * iterator otherwise.
      */
-    [[nodiscard]] iterator find(const entity_type entt) const noexcept {
+    [[nodiscard]] const_iterator find(const entity_type entt) const noexcept {
         return contains(entt) ? to_iterator(entt) : end();
     }