소스 검색

container: const correctness

Michele Caini 1 년 전
부모
커밋
399ca817ec
3개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 3 3
      src/entt/container/dense_map.hpp
  2. 3 3
      src/entt/container/dense_set.hpp
  3. 2 2
      src/entt/container/table.hpp

+ 3 - 3
src/entt/container/dense_map.hpp

@@ -83,7 +83,7 @@ public:
     }
     }
 
 
     constexpr dense_map_iterator operator++(int) noexcept {
     constexpr dense_map_iterator operator++(int) noexcept {
-        dense_map_iterator orig = *this;
+        const dense_map_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 
@@ -92,7 +92,7 @@ public:
     }
     }
 
 
     constexpr dense_map_iterator operator--(int) noexcept {
     constexpr dense_map_iterator operator--(int) noexcept {
-        dense_map_iterator orig = *this;
+        const dense_map_iterator orig = *this;
         return operator--(), orig;
         return operator--(), orig;
     }
     }
 
 
@@ -208,7 +208,7 @@ public:
     }
     }
 
 
     constexpr dense_map_local_iterator operator++(int) noexcept {
     constexpr dense_map_local_iterator operator++(int) noexcept {
-        dense_map_local_iterator orig = *this;
+        const dense_map_local_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 

+ 3 - 3
src/entt/container/dense_set.hpp

@@ -49,7 +49,7 @@ public:
     }
     }
 
 
     constexpr dense_set_iterator operator++(int) noexcept {
     constexpr dense_set_iterator operator++(int) noexcept {
-        dense_set_iterator orig = *this;
+        const dense_set_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 
@@ -58,7 +58,7 @@ public:
     }
     }
 
 
     constexpr dense_set_iterator operator--(int) noexcept {
     constexpr dense_set_iterator operator--(int) noexcept {
-        dense_set_iterator orig = *this;
+        const dense_set_iterator orig = *this;
         return operator--(), orig;
         return operator--(), orig;
     }
     }
 
 
@@ -170,7 +170,7 @@ public:
     }
     }
 
 
     constexpr dense_set_local_iterator operator++(int) noexcept {
     constexpr dense_set_local_iterator operator++(int) noexcept {
-        dense_set_local_iterator orig = *this;
+        const dense_set_local_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 

+ 2 - 2
src/entt/container/table.hpp

@@ -43,7 +43,7 @@ public:
     }
     }
 
 
     constexpr table_iterator operator++(int) noexcept {
     constexpr table_iterator operator++(int) noexcept {
-        table_iterator orig = *this;
+        const table_iterator orig = *this;
         return ++(*this), orig;
         return ++(*this), orig;
     }
     }
 
 
@@ -52,7 +52,7 @@ public:
     }
     }
 
 
     constexpr table_iterator operator--(int) noexcept {
     constexpr table_iterator operator--(int) noexcept {
-        table_iterator orig = *this;
+        const table_iterator orig = *this;
         return operator--(), orig;
         return operator--(), orig;
     }
     }