* Use B_PRI* macros.
* Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42176 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -111,7 +111,7 @@ BRegion::operator=(const BRegion& region)
|
|||||||
fBounds = region.fBounds;
|
fBounds = region.fBounds;
|
||||||
fCount = region.fCount;
|
fCount = region.fCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,10 +125,10 @@ BRegion::operator==(const BRegion& other) const
|
|||||||
{
|
{
|
||||||
if (&other == this)
|
if (&other == this)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (fCount != other.fCount)
|
if (fCount != other.fCount)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return memcmp(fData, other.fData, fCount * sizeof(clipping_rect)) == 0;
|
return memcmp(fData, other.fData, fCount * sizeof(clipping_rect)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ BRegion::RectAt(int32 index) const
|
|||||||
const clipping_rect& r = fData[index];
|
const clipping_rect& r = fData[index];
|
||||||
return BRect(r.left, r.top, r.right - 1, r.bottom - 1);
|
return BRect(r.left, r.top, r.right - 1, r.bottom - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return BRect();
|
return BRect();
|
||||||
// an invalid BRect
|
// an invalid BRect
|
||||||
}
|
}
|
||||||
@@ -332,7 +332,8 @@ BRegion::PrintToStream() const
|
|||||||
|
|
||||||
for (long i = 0; i < fCount; i++) {
|
for (long i = 0; i < fCount; i++) {
|
||||||
clipping_rect *rect = &fData[i];
|
clipping_rect *rect = &fData[i];
|
||||||
printf("data[%ld] = BRect(l:%ld.0, t:%ld.0, r:%ld.0, b:%ld.0)\n",
|
printf("data[%ld] = BRect(l:%" B_PRId32 ".0, t:%" B_PRId32
|
||||||
|
".0, r:%" B_PRId32 ".0, b:%" B_PRId32 ".0)\n",
|
||||||
i, rect->left, rect->top, rect->right - 1, rect->bottom - 1);
|
i, rect->left, rect->top, rect->right - 1, rect->bottom - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,7 +394,7 @@ BRegion::Include(clipping_rect rect)
|
|||||||
{
|
{
|
||||||
if (!valid_rect(rect))
|
if (!valid_rect(rect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// convert to internal rect format
|
// convert to internal rect format
|
||||||
rect.right ++;
|
rect.right ++;
|
||||||
rect.bottom ++;
|
rect.bottom ++;
|
||||||
@@ -442,7 +443,7 @@ BRegion::Exclude(clipping_rect rect)
|
|||||||
{
|
{
|
||||||
if (!valid_rect(rect))
|
if (!valid_rect(rect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// convert to internal rect format
|
// convert to internal rect format
|
||||||
rect.right ++;
|
rect.right ++;
|
||||||
rect.bottom ++;
|
rect.bottom ++;
|
||||||
@@ -568,7 +569,7 @@ BRegion::_SetSize(long newSize)
|
|||||||
MakeEmpty();
|
MakeEmpty();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fData) {
|
if (!fData) {
|
||||||
// allocation actually failed
|
// allocation actually failed
|
||||||
fDataSize = 0;
|
fDataSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user