summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-08 07:53:01 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-08 07:53:01 +0100
commitbfefeca5d59f26fb2b7b605d9dc7dbdead1a8ec4 (patch)
treeafb5586743af4902bd1b1daca4e648c236e275a8 /src
parente81718fa2b2fae048161742bb81f8a76daf0436f (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/wall-atlas.cpp6
-rw-r--r--src/wall-atlas.hpp10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp
index 24910549..344404d3 100644
--- a/src/wall-atlas.cpp
+++ b/src/wall-atlas.cpp
@@ -127,4 +127,10 @@ bool Direction::is_empty() const noexcept
return true;
}
+bool Frame::operator==(const Frame&) const noexcept = default;
+bool Group::operator==(const Group&) const noexcept = default;
+bool Direction::operator==(const Direction&) const noexcept = default;
+bool Info::operator==(const floormat::Wall::Info&) const noexcept = default;
+bool DirArrayIndex::operator==(const floormat::Wall::DirArrayIndex&) const noexcept = default;
+
} // namespace floormat::Wall
diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp
index c54c3971..8df0c1ec 100644
--- a/src/wall-atlas.hpp
+++ b/src/wall-atlas.hpp
@@ -15,6 +15,8 @@ namespace floormat::Wall {
struct Frame
{
Vector2ui offset = { (unsigned)-1, (unsigned)-1 };
+
+ bool operator==(const Frame&) const noexcept;
};
struct Group
@@ -29,6 +31,8 @@ struct Group
explicit operator bool() const noexcept { return !is_empty(); }
bool is_empty() const noexcept { return count == 0; }
+
+ bool operator==(const Group&) const noexcept;
};
enum class Tag : uint8_t { wall, overlay, side, top, corner_L, corner_R, COUNT };
@@ -55,17 +59,23 @@ struct Direction
{ "corner-R"_s, &Direction::corner_R, Tag::corner_R, },
};
static_assert(arraySize(members) == (size_t)Tag::COUNT);
+
+ bool operator==(const Direction&) const noexcept;
};
struct Info
{
String name = "(unnamed)"_s, description = {};
unsigned depth = 0;
+
+ bool operator==(const Info&) const noexcept;
};
struct DirArrayIndex {
std::uint8_t val = (uint8_t)-1;
operator bool() const { return val == (uint8_t)-1; }
+
+ bool operator==(const DirArrayIndex&) const noexcept;
};
} // namespace floormat::Wall