mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Revert "Derive operator!= from operator== (#1660)"
This reverts commit 993879a2ed.
This commit is contained in:
@@ -40,6 +40,7 @@ struct Rgba {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(Rgba const &rhs) const { return toCSS() == rhs.toCSS(); }
|
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
|
// 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.
|
// Since the rest of the bits don't matter then, we return 0x8000 exactly.
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ class EnumSeq {
|
|||||||
EnumT operator*() const { return _value; }
|
EnumT operator*() const { return _value; }
|
||||||
|
|
||||||
bool operator==(Iterator const &rhs) const { return _value == rhs._value; }
|
bool operator==(Iterator const &rhs) const { return _value == rhs._value; }
|
||||||
|
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -131,6 +132,7 @@ public:
|
|||||||
bool operator==(ZipIterator const &rhs) const {
|
bool operator==(ZipIterator const &rhs) const {
|
||||||
return std::get<0>(_iters) == std::get<0>(rhs._iters);
|
return std::get<0>(_iters) == std::get<0>(rhs._iters);
|
||||||
}
|
}
|
||||||
|
bool operator!=(ZipIterator const &rhs) const { return !operator==(rhs); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Only needed inside `zip` below.
|
// Only needed inside `zip` below.
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ private:
|
|||||||
SectionT &operator*() const { return *_piece; }
|
SectionT &operator*() const { return *_piece; }
|
||||||
|
|
||||||
bool operator==(Iterator const &rhs) const { return _piece == rhs._piece; }
|
bool operator==(Iterator const &rhs) const { return _piece == rhs._piece; }
|
||||||
|
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ private:
|
|||||||
AssignedSetsIter() = default;
|
AssignedSetsIter() = default;
|
||||||
|
|
||||||
bool operator==(AssignedSetsIter const &rhs) const { return _iter == rhs._iter; }
|
bool operator==(AssignedSetsIter const &rhs) const { return _iter == rhs._iter; }
|
||||||
|
bool operator!=(AssignedSetsIter const &rhs) const { return !operator==(rhs); }
|
||||||
|
|
||||||
AssignedSetsIter &operator++() {
|
AssignedSetsIter &operator++() {
|
||||||
++_iter;
|
++_iter;
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ struct Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(Iterator const &rhs) const { return coords() == rhs.coords(); }
|
bool operator==(Iterator const &rhs) const { return coords() == rhs.coords(); }
|
||||||
|
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user