diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-23 17:36:19 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-23 17:36:19 +0200 |
| commit | cd855825de415111c55f16bf05a57f1191d97c76 (patch) | |
| tree | a8bde7b5fefd7ab2ad6a454a33e92f321d7b00fc | |
| parent | 4ec6a2ae12b6adb843c0777649ff45a741ca6cbc (diff) | |
| download | turns-cd855825de415111c55f16bf05a57f1191d97c76.tar.xz turns-cd855825de415111c55f16bf05a57f1191d97c76.zip | |
domain/turn_order: fix sorting predicate
| -rw-r--r-- | domain/src/turn_order.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/domain/src/turn_order.cpp b/domain/src/turn_order.cpp index 0f8b6e8..e3a1e23 100644 --- a/domain/src/turn_order.cpp +++ b/domain/src/turn_order.cpp @@ -15,16 +15,7 @@ namespace turns::domain namespace { auto constexpr comparator = [](auto lhs, auto rhs) { - auto result = *lhs <=> *rhs; - if (result == std::partial_ordering::equivalent || result == std::partial_ordering::unordered) - { - return 0; - } - else if (result == std::partial_ordering::less) - { - return 1; - } - return -1; + return *lhs > *rhs; }; auto constexpr equal_comparator = [](auto lhs, auto rhs) { |
