summaryrefslogtreecommitdiffhomepage
path: root/src/tile-iterator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-18 23:42:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-18 23:42:07 +0100
commit4d9a82b720c8ce74b94f43f72ddd819ef21abbdf (patch)
treec0a5d21b8e19fbb60c286faec8e302e6f32b6679 /src/tile-iterator.cpp
parent32b8c22828315292857e2cd9909fba620f30ff70 (diff)
pre-declare integer types without cstddef/cstdint
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 9214faa9..ac0fff67 100644
--- a/src/tile-iterator.cpp
+++ b/src/tile-iterator.cpp
@@ -3,24 +3,24 @@
namespace floormat {
-tile_iterator::tile_iterator(chunk& c, std::size_t pos) noexcept : c{&c}, pos{pos} {}
+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, std::uint8_t(pos)}, pos, local_coords{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, std::size_t pos) noexcept : c{&c}, pos{pos} {}
+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), std::uint8_t(pos)}), pos, local_coords{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