src/colors.h

changeset 188
64ea7282611e
parent 178
a23024fc98e0
child 196
6bcb284679d4
--- 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};

mercurial