diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-04 21:14:53 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-05 03:24:48 +0200 |
| commit | fbc36568af5d9142a45bee57323b8a5457a114f8 (patch) | |
| tree | 8d838f0ad42823e4816a5ad4cdd66d03434ba6ad /src/tile-iterator.cpp | |
| parent | 78ca913d82a0c30e978b69a8ed2685d92ae9eb36 (diff) | |
src: remove the tile_iterator class
This is too crufty to bother with.
Diffstat (limited to 'src/tile-iterator.cpp')
| -rw-r--r-- | src/tile-iterator.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/tile-iterator.cpp b/src/tile-iterator.cpp deleted file mode 100644 index ac0fff67..00000000 --- a/src/tile-iterator.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "tile-iterator.hpp" -#include "tile.hpp" - -namespace floormat { - -tile_iterator::tile_iterator(chunk& c, size_t pos) noexcept : c{&c}, pos{pos} {} -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++(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); } -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->() noexcept { return { tile_ref{*c, uint8_t(pos)}, pos, local_coords{pos} }; } -tile_iterator_tuple tile_iterator::operator*() noexcept { return operator->(); } - -tile_const_iterator::tile_const_iterator(const chunk& c, size_t pos) noexcept : c{&c}, pos{pos} {} -tile_const_iterator::tile_const_iterator(const tile_const_iterator& x) noexcept = default; -tile_const_iterator& tile_const_iterator::operator=(const tile_const_iterator& x) noexcept { if (this != &x) { c = x.c; pos = x.pos; } return *this; } -tile_const_iterator& tile_const_iterator::operator++() noexcept { pos++; return *this; } -tile_const_iterator tile_const_iterator::operator++(int) noexcept { auto it = *this; pos++; return it; } -void tile_const_iterator::swap(tile_const_iterator& other) noexcept { std::swap(c, other.c); std::swap(pos, other.pos); } -bool operator==(const tile_const_iterator& a, const tile_const_iterator& b) noexcept { return a.c == b.c && a.pos == b.pos; } -tile_const_iterator_tuple tile_const_iterator::operator->() noexcept { return { tile_proto(tile_ref{*const_cast<chunk*>(c), uint8_t(pos)}), pos, local_coords{pos}, }; } -tile_const_iterator_tuple tile_const_iterator::operator*() noexcept { return operator->(); } - -} // namespace floormat |
