diff --git a/src/kits/interface/Region.cpp b/src/kits/interface/Region.cpp index d68f662c51..e9adcd78b8 100644 --- a/src/kits/interface/Region.cpp +++ b/src/kits/interface/Region.cpp @@ -111,7 +111,7 @@ BRegion::operator=(const BRegion& region) fBounds = region.fBounds; fCount = region.fCount; } - + return *this; } @@ -125,10 +125,10 @@ BRegion::operator==(const BRegion& other) const { if (&other == this) return true; - + if (fCount != other.fCount) return false; - + 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]; return BRect(r.left, r.top, r.right - 1, r.bottom - 1); } - + return BRect(); // an invalid BRect } @@ -332,7 +332,8 @@ BRegion::PrintToStream() const for (long i = 0; i < fCount; 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); } } @@ -393,7 +394,7 @@ BRegion::Include(clipping_rect rect) { if (!valid_rect(rect)) return; - + // convert to internal rect format rect.right ++; rect.bottom ++; @@ -442,7 +443,7 @@ BRegion::Exclude(clipping_rect rect) { if (!valid_rect(rect)) return; - + // convert to internal rect format rect.right ++; rect.bottom ++; @@ -568,7 +569,7 @@ BRegion::_SetSize(long newSize) MakeEmpty(); return true; } - + if (!fData) { // allocation actually failed fDataSize = 0;