Use SkASSERTResult to avoid unused local variables
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003653002 Review-Url: https://codereview.chromium.org/2003653002
This commit is contained in:
parent
de8af07e41
commit
beb1c67c9d
@ -223,8 +223,7 @@ void Viewer::setupCurrentSlide(int previousSlide) {
|
||||
const SkRect slideBounds = SkRect::MakeIWH(slideSize.width(), slideSize.height());
|
||||
if (contentRect.width() > 0 && contentRect.height() > 0) {
|
||||
fDefaultMatrix.setRectToRect(slideBounds, contentRect, SkMatrix::kStart_ScaleToFit);
|
||||
bool inverted = fDefaultMatrix.invert(&fDefaultMatrixInv);
|
||||
SkASSERT(inverted);
|
||||
SkAssertResult(fDefaultMatrix.invert(&fDefaultMatrixInv));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,13 +77,11 @@ void SkiaAndroidApp::paintIfNeeded() {
|
||||
}
|
||||
|
||||
void SkiaAndroidApp::postMessage(const Message& message) const {
|
||||
auto writeSize = write(fPipes[1], &message, sizeof(message));
|
||||
SkASSERT(writeSize == sizeof(message));
|
||||
SkAssertResult(write(fPipes[1], &message, sizeof(message)) == sizeof(message));
|
||||
}
|
||||
|
||||
void SkiaAndroidApp::readMessage(Message* message) const {
|
||||
auto readSize = read(fPipes[0], message, sizeof(Message));
|
||||
SkASSERT(readSize == sizeof(Message));
|
||||
SkAssertResult(read(fPipes[0], message, sizeof(Message)) == sizeof(Message));
|
||||
}
|
||||
|
||||
void SkiaAndroidApp::inval() {
|
||||
|
Loading…
Reference in New Issue
Block a user