mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Derive operator!= from operator== (#1660)
This commit is contained in:
@@ -100,7 +100,7 @@ jobs:
|
|||||||
path: rgbds-${{ env.version }}-macos.zip
|
path: rgbds-${{ env.version }}-macos.zip
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
runs-on: ubuntu-20.04 # Oldest supported, for best glibc compatibility.
|
runs-on: ubuntu-22.04 # Oldest supported, for best glibc compatibility.
|
||||||
steps:
|
steps:
|
||||||
- name: Get version from tag
|
- name: Get version from tag
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
- name: Install deps
|
- name: Install deps
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
./.github/scripts/install_deps.sh ubuntu-20.04
|
./.github/scripts/install_deps.sh ubuntu-22.04
|
||||||
- name: Build binaries
|
- name: Build binaries
|
||||||
run: |
|
run: |
|
||||||
make -kj WARNFLAGS="-Wall -Wextra -pedantic -static" PKG_CONFIG="pkg-config --static" Q=
|
make -kj WARNFLAGS="-Wall -Wextra -pedantic -static" PKG_CONFIG="pkg-config --static" Q=
|
||||||
|
|||||||
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
unix:
|
unix:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, ubuntu-22.04, macos-14]
|
os: [ubuntu-22.04, macos-14]
|
||||||
cxx: [g++, clang++]
|
cxx: [g++, clang++]
|
||||||
buildsys: [make, cmake]
|
buildsys: [make, cmake]
|
||||||
exclude:
|
exclude:
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ 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.
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class EnumSeq {
|
|||||||
auto operator*() const { return _value; }
|
auto 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:
|
||||||
@@ -59,7 +58,6 @@ 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); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ private:
|
|||||||
Iter() = default;
|
Iter() = default;
|
||||||
|
|
||||||
bool operator==(Iter const &rhs) const { return _iter == rhs._iter; }
|
bool operator==(Iter const &rhs) const { return _iter == rhs._iter; }
|
||||||
bool operator!=(Iter const &rhs) const { return !operator==(rhs); }
|
|
||||||
|
|
||||||
Iter &operator++() {
|
Iter &operator++() {
|
||||||
++_iter;
|
++_iter;
|
||||||
|
|||||||
@@ -466,7 +466,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
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