[Scummvm-cvs-logs] SF.net SVN: scummvm:[52249] scummvm/trunk/common/rect.h
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Aug 21 10:17:06 CEST 2010
Revision: 52249
http://scummvm.svn.sourceforge.net/scummvm/?rev=52249&view=rev
Author: dreammaster
Date: 2010-08-21 08:17:06 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
COMMON: Added equality operators to Common::Rect
Modified Paths:
--------------
scummvm/trunk/common/rect.h
Modified: scummvm/trunk/common/rect.h
===================================================================
--- scummvm/trunk/common/rect.h 2010-08-20 22:56:13 UTC (rev 52248)
+++ scummvm/trunk/common/rect.h 2010-08-21 08:17:06 UTC (rev 52249)
@@ -90,6 +90,9 @@
Rect(int16 x1, int16 y1, int16 x2, int16 y2) : top(y1), left(x1), bottom(y2), right(x2) {
assert(isValidRect());
}
+ bool operator==(const Rect &rhs) const { return equals(rhs); }
+ bool operator!=(const Rect &rhs) const { return !equals(rhs); }
+
int16 width() const { return right - left; }
int16 height() const { return bottom - top; }
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