[Scummvm-cvs-logs] SF.net SVN: scummvm:[38428] scummvm/trunk/common/rect.h

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Feb 17 18:44:04 CET 2009


Revision: 38428
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38428&view=rev
Author:   thebluegr
Date:     2009-02-17 17:44:04 +0000 (Tue, 17 Feb 2009)

Log Message:
-----------
Added an "equals" function to Common::Rect (used by SCI)

Modified Paths:
--------------
    scummvm/trunk/common/rect.h

Modified: scummvm/trunk/common/rect.h
===================================================================
--- scummvm/trunk/common/rect.h	2009-02-17 17:37:01 UTC (rev 38427)
+++ scummvm/trunk/common/rect.h	2009-02-17 17:44:04 UTC (rev 38428)
@@ -138,6 +138,17 @@
 	}
 
 	/**
+	 * Check if the given rect is equal to this one.
+	 *
+	 * @param r The rectangle to check
+	 *
+	 * @return true if the given rect is equal, false otherwise
+	 */
+	bool equals(const Rect &r) const {
+		return (left == r.left) && (right == r.right) && (top == r.top) && (bottom == r.bottom);
+	}
+
+	/**
 	 * Check if given rectangle intersects with this rectangle
 	 *
 	 * @param r the rectangle to check


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list