Skip to content

Commit

Permalink
container: const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Jan 21, 2025
1 parent 2fb2ace commit 399ca81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/entt/container/dense_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class dense_map_iterator final {
}

constexpr dense_map_iterator operator++(int) noexcept {
dense_map_iterator orig = *this;
const dense_map_iterator orig = *this;
return ++(*this), orig;
}

Expand All @@ -92,7 +92,7 @@ class dense_map_iterator final {
}

constexpr dense_map_iterator operator--(int) noexcept {
dense_map_iterator orig = *this;
const dense_map_iterator orig = *this;
return operator--(), orig;
}

Expand Down Expand Up @@ -208,7 +208,7 @@ class dense_map_local_iterator final {
}

constexpr dense_map_local_iterator operator++(int) noexcept {
dense_map_local_iterator orig = *this;
const dense_map_local_iterator orig = *this;
return ++(*this), orig;
}

Expand Down
6 changes: 3 additions & 3 deletions src/entt/container/dense_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class dense_set_iterator final {
}

constexpr dense_set_iterator operator++(int) noexcept {
dense_set_iterator orig = *this;
const dense_set_iterator orig = *this;
return ++(*this), orig;
}

Expand All @@ -58,7 +58,7 @@ class dense_set_iterator final {
}

constexpr dense_set_iterator operator--(int) noexcept {
dense_set_iterator orig = *this;
const dense_set_iterator orig = *this;
return operator--(), orig;
}

Expand Down Expand Up @@ -170,7 +170,7 @@ class dense_set_local_iterator final {
}

constexpr dense_set_local_iterator operator++(int) noexcept {
dense_set_local_iterator orig = *this;
const dense_set_local_iterator orig = *this;
return ++(*this), orig;
}

Expand Down
4 changes: 2 additions & 2 deletions src/entt/container/table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class table_iterator {
}

constexpr table_iterator operator++(int) noexcept {
table_iterator orig = *this;
const table_iterator orig = *this;
return ++(*this), orig;
}

Expand All @@ -52,7 +52,7 @@ class table_iterator {
}

constexpr table_iterator operator--(int) noexcept {
table_iterator orig = *this;
const table_iterator orig = *this;
return operator--(), orig;
}

Expand Down

0 comments on commit 399ca81

Please sign in to comment.