diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-24 11:48:45 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-24 11:48:45 +0200 |
commit | 451314241dc40c4e3be600ef95a4f4fbd322f701 (patch) | |
tree | 1c55abe5e0027df578a792015254e4b95b8e6d80 /src/common/Utilities/TaskScheduler.h | |
parent | 343d09bc95ade0cc34f953b56cbe666baca387fc (diff) |
Core/Misc: Modernize comparison operators
(cherry picked from commit f0a862e71bc12d86a898901ef773475a7c964832)
Diffstat (limited to 'src/common/Utilities/TaskScheduler.h')
-rw-r--r-- | src/common/Utilities/TaskScheduler.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/common/Utilities/TaskScheduler.h b/src/common/Utilities/TaskScheduler.h index 4d6761780be..3af5fc70a12 100644 --- a/src/common/Utilities/TaskScheduler.h +++ b/src/common/Utilities/TaskScheduler.h @@ -95,18 +95,13 @@ class TC_COMMON_API TaskScheduler Task& operator= (Task&& right) = delete; // Order tasks by its end - inline bool operator< (Task const& other) const + std::weak_ordering operator<=> (Task const& other) const { - return _end < other._end; - } - - inline bool operator> (Task const& other) const - { - return _end > other._end; + return _end <=> other._end; } // Compare tasks with its end - inline bool operator== (Task const& other) + bool operator== (Task const& other) const { return _end == other._end; } @@ -126,7 +121,7 @@ class TC_COMMON_API TaskScheduler bool operator() (TaskContainer const& left, TaskContainer const& right) const { return (*left.get()) < (*right.get()); - }; + } }; class TC_COMMON_API TaskQueue |