Browse Source

view_iterator(s): const correctness

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

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

@@ -103,7 +103,7 @@ public:
     }
     }
 
 
     view_iterator operator++(int) noexcept {
     view_iterator operator++(int) noexcept {
-        view_iterator orig = *this;
+        const view_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 
@@ -162,7 +162,7 @@ public:
     }
     }
 
 
     extended_view_iterator operator++(int) noexcept {
     extended_view_iterator operator++(int) noexcept {
-        extended_view_iterator orig = *this;
+        const extended_view_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }