summaryrefslogtreecommitdiffhomepage
path: root/src/tile-iterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tile-iterator.cpp')
-rw-r--r--src/tile-iterator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tile-iterator.cpp b/src/tile-iterator.cpp
index 943bbaf8..6dfc5f6d 100644
--- a/src/tile-iterator.cpp
+++ b/src/tile-iterator.cpp
@@ -8,12 +8,12 @@ tile_iterator::tile_iterator(const tile_iterator&) noexcept = default;
tile_iterator& tile_iterator::operator=(const tile_iterator&) noexcept = default;
tile_iterator& tile_iterator::operator++() noexcept { pos++; return *this; }
-tile_iterator tile_iterator::operator++() noexcept { auto it = *this; pos++; return it; }
+tile_iterator tile_iterator::operator++(int) noexcept { auto it = *this; pos++; return it; }
void tile_iterator::swap(tile_iterator& other) noexcept { std::swap(c, other.c); std::swap(pos, other.pos); }
-std::strong_ordering tile_iterator::operator<=>(const tile_iterator&) const noexcept = default;
+bool operator==(const tile_iterator& a, const tile_iterator& b) noexcept { return a.c == b.c && a.pos == b.pos; }
-tile_iterator_tuple tile_iterator::operator->() { return { tile_ref{*c, i}, i, local_coords{i} }; }
-tile_iterator_tuple tile_iterator::operator*() { return { tile_ref{*c, i}, i, local_coords{i} }; }
+tile_iterator_tuple tile_iterator::operator->() noexcept { return { tile_ref{*c, std::uint8_t(pos)}, pos, local_coords{pos} }; }
+tile_iterator_tuple tile_iterator::operator*() noexcept { return { tile_ref{*c, std::uint8_t(pos)}, pos, local_coords{pos} }; }
} // namespace floormat