mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Define operator!= in terms of operator== (#1659)
This commit is contained in:
@@ -86,8 +86,9 @@ private:
|
||||
public:
|
||||
Iter() = default;
|
||||
|
||||
bool operator==(Iter const &other) const { return _iter == other._iter; }
|
||||
bool operator!=(Iter const &other) const { return !(*this == other); }
|
||||
bool operator==(Iter const &rhs) const { return _iter == rhs._iter; }
|
||||
bool operator!=(Iter const &rhs) const { return !operator==(rhs); }
|
||||
|
||||
Iter &operator++() {
|
||||
++_iter;
|
||||
skipEmpty();
|
||||
@@ -98,6 +99,7 @@ private:
|
||||
++(*this);
|
||||
return it;
|
||||
}
|
||||
|
||||
reference operator*() const {
|
||||
assume((*_iter).has_value());
|
||||
return **_iter;
|
||||
|
||||
Reference in New Issue
Block a user