sources/geometry.h

changeset 69
eb4c25284a19
parent 1
4dd5bde4e777
child 73
07dda51a7a8e
--- a/sources/geometry.h	Tue Dec 16 23:50:56 2014 +0200
+++ b/sources/geometry.h	Mon May 04 15:51:03 2015 +0300
@@ -43,12 +43,41 @@
 		x (0),
 		y (0) {}
 
-	inline METHOD operator< (const Position& other) const -> bool;
-	inline METHOD operator> (const Position& other) const -> bool;
-	inline METHOD operator== (const Position& other) const -> bool;
-	inline METHOD operator<= (const Position& other) const -> bool;
-	inline METHOD operator>= (const Position& other) const -> bool;
-	inline METHOD operator!= (const Position& other) const -> bool;
+	bool operator< (const Position& other) const
+	{
+		if (y != other.y)
+			return y < other.y;
+
+		return x < other.x;
+	}
+
+	bool operator> (const Position& other) const
+	{
+		if (y != other.y)
+			return y > other.y;
+
+		return x > other.x;
+	}
+
+	bool operator== (const Position& other) const
+	{
+		return y == other.y and x == other.x;
+	}
+
+	bool operator!= (const Position& other) const
+	{
+		return not operator== (other);
+	}
+
+	bool operator<= (const Position& other) const
+	{
+		return not operator> (other);
+	}
+
+	bool operator>= (const Position& other) const
+	{
+		return not operator< (other);
+	}
 };
 
 // -------------------------------------------------------------------------------------------------
@@ -84,57 +113,3 @@
 		Position(),
 		Size() {}
 };
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator< (const Position& other) const -> bool
-{
-	if (y != other.y)
-		return y < other.y;
-
-	return x < other.x;
-}
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator> (const Position& other) const -> bool
-{
-	if (y != other.y)
-		return y > other.y;
-
-	return x > other.x;
-}
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator== (const Position& other) const -> bool
-{
-	return y == other.y and x == other.x;
-}
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator<= (const Position& other) const -> bool
-{
-	return not operator> (other);
-}
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator>= (const Position& other) const -> bool
-{
-	return not operator< (other);
-}
-
-// -------------------------------------------------------------------------------------------------
-
-inline METHOD
-Position::operator!= (const Position& other) const -> bool
-{
-	return not operator== (other);
-}

mercurial