diff -r 30204975694a -r 64ea7282611e src/colors.h --- a/src/colors.h Mon May 16 01:40:49 2022 +0300 +++ b/src/colors.h Tue May 24 16:11:10 2022 +0300 @@ -55,6 +55,7 @@ struct ldraw::Color { qint32 index = 0; + constexpr auto operator<=>(const Color&) const = default; }; Q_DECLARE_METATYPE(ldraw::Color) @@ -63,36 +64,6 @@ namespace ldraw { - constexpr bool operator==(Color one, Color other) - { - return one.index == other.index; - } - - constexpr bool operator!=(Color one, Color other) - { - return one.index != other.index; - } - - constexpr bool operator<(Color one, Color other) - { - return one.index < other.index; - } - - constexpr bool operator<=(Color one, Color other) - { - return one.index <= other.index; - } - - constexpr bool operator>(Color one, Color other) - { - return one.index > other.index; - } - - constexpr bool operator>=(Color one, Color other) - { - return one.index >= other.index; - } - static constexpr Color BLACK {0}; static constexpr Color BLUE {1}; static constexpr Color GREEN {2};