diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 16:00:29 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 16:00:29 +0200 |
| commit | a23cda29f0acef40d883c37209389c956c14e83b (patch) | |
| tree | 8d9cb59da154da5cbe75cedbaf6b52ebc8d2eb54 /domain/src/turn_order.cpp | |
| parent | bcea0775a7a07738b3eec1b00cef618de84f3e41 (diff) | |
| download | turns-a23cda29f0acef40d883c37209389c956c14e83b.tar.xz turns-a23cda29f0acef40d883c37209389c956c14e83b.zip | |
turns: perform widespread code cleanup actions
Diffstat (limited to 'domain/src/turn_order.cpp')
| -rw-r--r-- | domain/src/turn_order.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/domain/src/turn_order.cpp b/domain/src/turn_order.cpp index 4c5c587..454e27a 100644 --- a/domain/src/turn_order.cpp +++ b/domain/src/turn_order.cpp @@ -1,23 +1,29 @@ #include "turns/domain/turn_order.hpp" +#include "turns/domain/participant.hpp" + +#include <compare> + +#include <glibmm/refptr.h> + namespace turns::domain { namespace { - auto constexpr comparator = [](auto lhs, auto rhs){ + auto constexpr comparator = [](auto lhs, auto rhs) { auto result = *lhs <=> *rhs; - if(result == std::partial_ordering::equivalent || result == std::partial_ordering::unordered) + if (result == std::partial_ordering::equivalent || result == std::partial_ordering::unordered) { return 0; } - else if(result == std::partial_ordering::less) + else if (result == std::partial_ordering::less) { return 1; } return -1; }; - } + } // namespace auto turn_order::create() -> Glib::RefPtr<turn_order> { |
