Skip to content

Commit 993879a

Browse files
authored
Derive operator!= from operator== (#1660)
1 parent 62309d5 commit 993879a

File tree

6 files changed

+3
-8
lines changed

6 files changed

+3
-8
lines changed

.github/workflows/create-release-artifacts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
path: rgbds-${{ env.version }}-macos.zip
101101

102102
linux:
103-
runs-on: ubuntu-20.04 # Oldest supported, for best glibc compatibility.
103+
runs-on: ubuntu-22.04 # Oldest supported, for best glibc compatibility.
104104
steps:
105105
- name: Get version from tag
106106
shell: bash
@@ -112,7 +112,7 @@ jobs:
112112
- name: Install deps
113113
shell: bash
114114
run: |
115-
./.github/scripts/install_deps.sh ubuntu-20.04
115+
./.github/scripts/install_deps.sh ubuntu-22.04
116116
- name: Build binaries
117117
run: |
118118
make -kj WARNFLAGS="-Wall -Wextra -pedantic -static" PKG_CONFIG="pkg-config --static" Q=

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
unix:
88
strategy:
99
matrix:
10-
os: [ubuntu-20.04, ubuntu-22.04, macos-14]
10+
os: [ubuntu-22.04, macos-14]
1111
cxx: [g++, clang++]
1212
buildsys: [make, cmake]
1313
exclude:

include/gfx/rgba.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ struct Rgba {
3838
}
3939

4040
bool operator==(Rgba const &rhs) const { return toCSS() == rhs.toCSS(); }
41-
bool operator!=(Rgba const &rhs) const { return !operator==(rhs); }
4241

4342
// CGB colors are RGB555, so we use bit 15 to signify that the color is transparent instead
4443
// Since the rest of the bits don't matter then, we return 0x8000 exactly.

include/itertools.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class EnumSeq {
2525
auto operator*() const { return _value; }
2626

2727
bool operator==(Iterator const &rhs) const { return _value == rhs._value; }
28-
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
2928
};
3029

3130
public:
@@ -59,7 +58,6 @@ class ZipIterator {
5958
bool operator==(ZipIterator const &rhs) const {
6059
return std::get<0>(_iters) == std::get<0>(rhs._iters);
6160
}
62-
bool operator!=(ZipIterator const &rhs) const { return !operator==(rhs); }
6361
};
6462

6563
template<typename... Ts>

src/gfx/pal_packing.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ class AssignedProtos {
8787
Iter() = default;
8888

8989
bool operator==(Iter const &rhs) const { return _iter == rhs._iter; }
90-
bool operator!=(Iter const &rhs) const { return !operator==(rhs); }
9190

9291
Iter &operator++() {
9392
++_iter;

src/gfx/process.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ class Png {
466466
}
467467

468468
bool operator==(Iterator const &rhs) const { return coords() == rhs.coords(); }
469-
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
470469
};
471470

472471
public:

0 commit comments

Comments
 (0)