Fixed some bugs reported by Stephan. You were right after all :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-11-30 09:12:24 +00:00
parent 5c2728e222
commit 927995cedd

View File

@ -267,13 +267,10 @@ ClipRegion::Exclude(const BRect &rect)
void
ClipRegion::Exclude(const ClipRegion &region)
{
if (fCount == 0)
return;
if (region.fCount == 0 || !rects_intersect(fBound, region.fBound))
*this = region;
else
_ExcludeComplex(region);
if (fCount == 0 || region.fCount == 0 || !rects_intersect(fBound, region.fBound))
return;
_ExcludeComplex(region);
}
@ -296,7 +293,7 @@ ClipRegion::operator=(const ClipRegion &region)
void
ClipRegion::_IntersectWithComplex(const ClipRegion &region)
{
ClipRegion dest(*this);
ClipRegion dest;
for (int32 f = 0; f < fCount; f++) {
for (int32 s = 0; s < region.fCount; s++) {