mirror of
https://github.com/gbdev/rgbds.git
synced 2026-06-10 02:32:34 +00:00
Do not support GCC 9 (#1978)
This will let us use C++20 features that GCC 9's experimental C++20 support did not yet cover, such as "concepts". This reverts some commits: -6bcd79b997-d5ce5329ea-728d14879b
This commit is contained in:
@@ -40,7 +40,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.
|
||||
|
||||
@@ -97,7 +97,6 @@ class EnumSeq {
|
||||
EnumT operator*() const { return _value; }
|
||||
|
||||
bool operator==(Iterator const &rhs) const { return _value == rhs._value; }
|
||||
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -132,7 +131,6 @@ public:
|
||||
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); }
|
||||
};
|
||||
|
||||
// Only needed inside `zip` below.
|
||||
|
||||
@@ -70,7 +70,6 @@ private:
|
||||
SectionT &operator*() const { return *_piece; }
|
||||
|
||||
bool operator==(Iterator const &rhs) const { return _piece == rhs._piece; }
|
||||
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
+2
-2
@@ -74,14 +74,14 @@ char const *printChar(int c);
|
||||
|
||||
struct Uppercase {
|
||||
// FNV-1a hash of an uppercased string
|
||||
size_t operator()(std::string const &str) const {
|
||||
constexpr size_t operator()(std::string const &str) const {
|
||||
return std::accumulate(RANGE(str), size_t(0x811C9DC5), [](size_t hash, char c) {
|
||||
return (hash ^ toUpper(c)) * 16777619;
|
||||
});
|
||||
}
|
||||
|
||||
// Compare two strings without case-sensitivity (by converting to uppercase)
|
||||
bool operator()(std::string const &str1, std::string const &str2) const {
|
||||
constexpr bool operator()(std::string const &str1, std::string const &str2) const {
|
||||
return std::equal(RANGE(str1), RANGE(str2), [](char c1, char c2) {
|
||||
return toUpper(c1) == toUpper(c2);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user