mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
Fix recursive comparison in VersionTag
This commit is contained in:
parent
530be4cfbb
commit
1b2c7606b6
1 changed files with 5 additions and 5 deletions
|
@ -78,28 +78,28 @@ namespace geode {
|
|||
};
|
||||
|
||||
constexpr bool operator<(std::optional<VersionTag> const& a, std::optional<VersionTag> const& b) {
|
||||
if (a && b) return a < b;
|
||||
if (a && b) return *a < *b;
|
||||
if (a) return true;
|
||||
if (b) return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(std::optional<VersionTag> const& a, std::optional<VersionTag> const& b) {
|
||||
if (a && b) return a <= b;
|
||||
if (a && b) return *a <= *b;
|
||||
if (a) return true;
|
||||
if (b) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
constexpr bool operator>(std::optional<VersionTag> const& a, std::optional<VersionTag> const& b) {
|
||||
if (a && b) return a > b;
|
||||
if (a && b) return *a > *b;
|
||||
if (a) return false;
|
||||
if (b) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
constexpr bool operator>=(std::optional<VersionTag> const& a, std::optional<VersionTag> const& b) {
|
||||
if (a && b) return a >= b;
|
||||
if (a && b) return *a >= *b;
|
||||
if (a) return false;
|
||||
if (b) return true;
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue