Browse Source

sparse_set_iterator: const correctness

Michele Caini 1 năm trước cách đây
mục cha
commit
588440b487
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/entt/entity/sparse_set.hpp

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

@@ -41,7 +41,7 @@ struct sparse_set_iterator final {
     }
 
     constexpr sparse_set_iterator operator++(int) noexcept {
-        sparse_set_iterator orig = *this;
+        const sparse_set_iterator orig = *this;
         return ++(*this), orig;
     }
 
@@ -50,7 +50,7 @@ struct sparse_set_iterator final {
     }
 
     constexpr sparse_set_iterator operator--(int) noexcept {
-        sparse_set_iterator orig = *this;
+        const sparse_set_iterator orig = *this;
         return operator--(), orig;
     }