diff --git a/include/gfx/rgba.hpp b/include/gfx/rgba.hpp index b86968b9..c87ad1b1 100644 --- a/include/gfx/rgba.hpp +++ b/include/gfx/rgba.hpp @@ -40,6 +40,7 @@ struct Rgba { } bool operator==(Rgba const &rhs) const { return toCSS() == rhs.toCSS(); } + bool operator!=(Rgba const &rhs) const { return !operator==(rhs); } // CGB colors are RGB555, so we use bit 15 to signify that the color is transparent instead // Since the rest of the bits don't matter then, we return 0x8000 exactly. diff --git a/include/itertools.hpp b/include/itertools.hpp index fb3ef59c..0a25c051 100644 --- a/include/itertools.hpp +++ b/include/itertools.hpp @@ -97,6 +97,7 @@ class EnumSeq { EnumT operator*() const { return _value; } bool operator==(Iterator const &rhs) const { return _value == rhs._value; } + bool operator!=(Iterator const &rhs) const { return !operator==(rhs); } }; public: @@ -131,6 +132,7 @@ public: bool operator==(ZipIterator const &rhs) const { return std::get<0>(_iters) == std::get<0>(rhs._iters); } + bool operator!=(ZipIterator const &rhs) const { return !operator==(rhs); } }; // Only needed inside `zip` below. diff --git a/include/link/section.hpp b/include/link/section.hpp index 0fb3ba36..029dc059 100644 --- a/include/link/section.hpp +++ b/include/link/section.hpp @@ -70,6 +70,7 @@ private: SectionT &operator*() const { return *_piece; } bool operator==(Iterator const &rhs) const { return _piece == rhs._piece; } + bool operator!=(Iterator const &rhs) const { return !operator==(rhs); } }; public: diff --git a/src/gfx/pal_packing.cpp b/src/gfx/pal_packing.cpp index 06257f6d..d9e32c0f 100644 --- a/src/gfx/pal_packing.cpp +++ b/src/gfx/pal_packing.cpp @@ -100,6 +100,7 @@ private: AssignedSetsIter() = default; bool operator==(AssignedSetsIter const &rhs) const { return _iter == rhs._iter; } + bool operator!=(AssignedSetsIter const &rhs) const { return !operator==(rhs); } AssignedSetsIter &operator++() { ++_iter; diff --git a/src/gfx/process.cpp b/src/gfx/process.cpp index 4d0673ba..1c2c6f44 100644 --- a/src/gfx/process.cpp +++ b/src/gfx/process.cpp @@ -263,6 +263,7 @@ struct Image { } bool operator==(Iterator const &rhs) const { return coords() == rhs.coords(); } + bool operator!=(Iterator const &rhs) const { return !operator==(rhs); } }; public: