From e455dfa110ff84a9d1a782d8acc46eb5ca2aa78f Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Sat, 15 Feb 2025 12:20:51 +0100 Subject: [PATCH] Derive `operator!=` from `operator==` --- .github/workflows/create-release-artifacts.yml | 4 ++-- .github/workflows/testing.yml | 2 +- include/gfx/rgba.hpp | 1 - include/itertools.hpp | 2 -- src/gfx/pal_packing.cpp | 1 - src/gfx/process.cpp | 1 - 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create-release-artifacts.yml b/.github/workflows/create-release-artifacts.yml index d54bc564c..eb5b615a5 100644 --- a/.github/workflows/create-release-artifacts.yml +++ b/.github/workflows/create-release-artifacts.yml @@ -100,7 +100,7 @@ jobs: path: rgbds-${{ env.version }}-macos.zip linux: - runs-on: ubuntu-20.04 # Oldest supported, for best glibc compatibility. + runs-on: ubuntu-22.04 # Oldest supported, for best glibc compatibility. steps: - name: Get version from tag shell: bash @@ -112,7 +112,7 @@ jobs: - name: Install deps shell: bash run: | - ./.github/scripts/install_deps.sh ubuntu-20.04 + ./.github/scripts/install_deps.sh ubuntu-22.04 - name: Build binaries run: | make -kj WARNFLAGS="-Wall -Wextra -pedantic -static" PKG_CONFIG="pkg-config --static" Q= diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e33aa792a..b39b2e52f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -7,7 +7,7 @@ jobs: unix: strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-14] + os: [ubuntu-22.04, macos-14] cxx: [g++, clang++] buildsys: [make, cmake] exclude: diff --git a/include/gfx/rgba.hpp b/include/gfx/rgba.hpp index 6b0a8a773..e26389f07 100644 --- a/include/gfx/rgba.hpp +++ b/include/gfx/rgba.hpp @@ -38,7 +38,6 @@ 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 581f77bcd..805a18382 100644 --- a/include/itertools.hpp +++ b/include/itertools.hpp @@ -25,7 +25,6 @@ class EnumSeq { auto operator*() const { return _value; } bool operator==(Iterator const &rhs) const { return _value == rhs._value; } - bool operator!=(Iterator const &rhs) const { return !operator==(rhs); } }; public: @@ -59,7 +58,6 @@ class ZipIterator { 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); } }; template diff --git a/src/gfx/pal_packing.cpp b/src/gfx/pal_packing.cpp index 6a33e6366..207210d06 100644 --- a/src/gfx/pal_packing.cpp +++ b/src/gfx/pal_packing.cpp @@ -87,7 +87,6 @@ class AssignedProtos { Iter() = default; bool operator==(Iter const &rhs) const { return _iter == rhs._iter; } - bool operator!=(Iter const &rhs) const { return !operator==(rhs); } Iter &operator++() { ++_iter; diff --git a/src/gfx/process.cpp b/src/gfx/process.cpp index f1fe5a227..c1753c1e3 100644 --- a/src/gfx/process.cpp +++ b/src/gfx/process.cpp @@ -466,7 +466,6 @@ class Png { } bool operator==(Iterator const &rhs) const { return coords() == rhs.coords(); } - bool operator!=(Iterator const &rhs) const { return !operator==(rhs); } }; public: