mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Misc: Modernize comparison operators
(cherry picked from commit f0a862e71b)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <winnt.h>
|
||||
#include <winternl.h>
|
||||
#include <dbghelp.h>
|
||||
#include <compare>
|
||||
#include <set>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
@@ -101,11 +102,8 @@ struct SymbolPair
|
||||
_offset = offset;
|
||||
}
|
||||
|
||||
bool operator<(SymbolPair const& other) const
|
||||
{
|
||||
return _offset < other._offset ||
|
||||
(_offset == other._offset && _type < other._type);
|
||||
}
|
||||
bool operator==(SymbolPair const& other) const = default;
|
||||
std::strong_ordering operator<=>(SymbolPair const& other) const = default;
|
||||
|
||||
DWORD _type;
|
||||
DWORD_PTR _offset;
|
||||
|
||||
Reference in New Issue
Block a user