diff --git a/headers/os/interface/Region.h b/headers/os/interface/Region.h index 55d8252efd..b7747f73ac 100644 --- a/headers/os/interface/Region.h +++ b/headers/os/interface/Region.h @@ -85,7 +85,7 @@ private: BRegion(const clipping_rect& rect); void _AdoptRegionData(BRegion& region); - bool _SetSize(long newSize); + bool _SetSize(int32 newSize); clipping_rect _Convert(const BRect& rect) const; clipping_rect _ConvertToInternal(const BRect& rect) const; @@ -93,8 +93,8 @@ private: const clipping_rect& rect) const; private: - long fCount; - long fDataSize; + int32 fCount; + int32 fDataSize; clipping_rect fBounds; clipping_rect* fData; }; diff --git a/src/kits/app/LinkReceiver.cpp b/src/kits/app/LinkReceiver.cpp index 91f42fb6cc..4928500da7 100644 --- a/src/kits/app/LinkReceiver.cpp +++ b/src/kits/app/LinkReceiver.cpp @@ -443,7 +443,7 @@ err: status_t LinkReceiver::ReadRegion(BRegion* region) { - status_t status = Read(®ion->fCount, sizeof(long)); + status_t status = Read(®ion->fCount, sizeof(int32)); if (status >= B_OK) status = Read(®ion->fBounds, sizeof(clipping_rect)); if (status >= B_OK) { diff --git a/src/kits/app/ServerLink.cpp b/src/kits/app/ServerLink.cpp index 2c1b2af9f2..ea7664abce 100644 --- a/src/kits/app/ServerLink.cpp +++ b/src/kits/app/ServerLink.cpp @@ -62,7 +62,7 @@ ServerLink::SetTo(port_id sender, port_id receiver) status_t ServerLink::ReadRegion(BRegion* region) { - fReceiver->Read(®ion->fCount, sizeof(long)); + fReceiver->Read(®ion->fCount, sizeof(int32)); if (region->fCount > 0) { fReceiver->Read(®ion->fBounds, sizeof(clipping_rect)); if (!region->_SetSize(region->fCount)) @@ -78,7 +78,7 @@ ServerLink::ReadRegion(BRegion* region) status_t ServerLink::AttachRegion(const BRegion& region) { - fSender->Attach(®ion.fCount, sizeof(long)); + fSender->Attach(®ion.fCount, sizeof(int32)); if (region.fCount > 0) { fSender->Attach(®ion.fBounds, sizeof(clipping_rect)); return fSender->Attach(region.fData, diff --git a/src/kits/interface/Region.cpp b/src/kits/interface/Region.cpp index d44529ec86..d2d06043bb 100644 --- a/src/kits/interface/Region.cpp +++ b/src/kits/interface/Region.cpp @@ -330,9 +330,9 @@ BRegion::PrintToStream() const { Frame().PrintToStream(); - for (long i = 0; i < fCount; i++) { + for (int32 i = 0; i < fCount; i++) { clipping_rect *rect = &fData[i]; - printf("data[%ld] = BRect(l:%" B_PRId32 ".0, t:%" B_PRId32 + printf("data[%" B_PRId32 "] = 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); } @@ -361,7 +361,7 @@ BRegion::OffsetBy(int32 x, int32 y) if (fCount > 0) { if (fData != &fBounds) { - for (long i = 0; i < fCount; i++) + for (int32 i = 0; i < fCount; i++) offset_rect(fData[i], x, y); } @@ -545,7 +545,7 @@ BRegion::_AdoptRegionData(BRegion& region) able to hold. */ bool -BRegion::_SetSize(long newSize) +BRegion::_SetSize(int32 newSize) { // we never shrink the size newSize = max_c(fDataSize, newSize);