BRegion: Do not "cheaply convert" to the internal format.
_ConvertToInternal does the same thing, and should get inlined under normal circumstances, so just use it. No functional change (intended). Change-Id: Ic4fc9daeb33ab33967d795065a077f282e844f6d Reviewed-on: https://review.haiku-os.org/c/haiku/+/2297 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: John Scipione <jscipione@gmail.com>
This commit is contained in:
parent
171057c06a
commit
ab319eb798
@ -122,10 +122,7 @@ BRegion::Set(clipping_rect clipping)
|
||||
|
||||
if (valid_rect(clipping) && fData != NULL) {
|
||||
fCount = 1;
|
||||
// cheap convert to internal rect format
|
||||
clipping.right++;
|
||||
clipping.bottom++;
|
||||
fData[0] = fBounds = clipping;
|
||||
fData[0] = fBounds = _ConvertToInternal(clipping);
|
||||
} else
|
||||
MakeEmpty();
|
||||
}
|
||||
@ -211,9 +208,7 @@ BRegion::Intersects(BRect rect) const
|
||||
bool
|
||||
BRegion::Intersects(clipping_rect clipping) const
|
||||
{
|
||||
// cheap convert to internal rect format
|
||||
clipping.right++;
|
||||
clipping.bottom++;
|
||||
clipping = _ConvertToInternal(clipping);
|
||||
|
||||
int result = Support::XRectInRegion(this, clipping);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user