X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin4_src%2FServer%2FCRect.cpp;h=acbcc27e30b3b7bb51a46089a5c168f1d88654a1;hb=HEAD;hp=6f504d855f9b871c5702d05f1730971039d84b2e;hpb=4696a38ba9ea5798e67ccd475c8b77f318db133d;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin4_src/Server/CRect.cpp b/Usermode/Applications/axwin4_src/Server/CRect.cpp index 6f504d85..acbcc27e 100644 --- a/Usermode/Applications/axwin4_src/Server/CRect.cpp +++ b/Usermode/Applications/axwin4_src/Server/CRect.cpp @@ -7,6 +7,7 @@ */ #include #include +#include namespace AxWin { @@ -57,10 +58,10 @@ CRect CRect::Intersection(const CRect& other) const int x2 = ::std::min(m_x2, other.m_x2); int y2 = ::std::min(m_y2, other.m_y2); - if( x1 <= x2 || y2 <= y1 ) + if( x2 <= x1 || y2 <= y1 ) return CRect(); - return CRect(x1, y1, x2-x1, y2-y2); + return CRect(x1, y1, x2-x1, y2-y1); } CRect CRect::RelativeIntersection(const CRect& area)