Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6817789e authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "Call isEmpty() instead of constructing a new object to compare"

parents 5a6bebb2 ff37ce97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@ int AImageDecoder_setCrop(AImageDecoder* decoder, ARect crop) {

    SkIRect cropIRect;
    cropIRect.setLTRB(crop.left, crop.top, crop.right, crop.bottom);
    SkIRect* cropPtr = cropIRect == SkIRect::MakeEmpty() ? nullptr : &cropIRect;
    SkIRect* cropPtr = cropIRect.isEmpty() ? nullptr : &cropIRect;
    return imageDecoder->setCropRect(cropPtr)
            ? ANDROID_IMAGE_DECODER_SUCCESS : ANDROID_IMAGE_DECODER_BAD_PARAMETER;
}