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

handle_storage_iterator: const correctness

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

+ 2 - 2
src/entt/entity/handle.hpp

@@ -47,12 +47,12 @@ public:
     }
 
     constexpr handle_storage_iterator &operator++() noexcept {
-        while(++it != last && !it->second.contains(entt)) {}
+        for(++it; it != last && !it->second.contains(entt); ++it) {}
         return *this;
     }
 
     constexpr handle_storage_iterator operator++(int) noexcept {
-        handle_storage_iterator orig = *this;
+        const handle_storage_iterator orig = *this;
         return ++(*this), orig;
     }