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:
liyuqian 2016-05-20 11:41:01 -07:00 committed by Commit bot
parent de8af07e41
commit beb1c67c9d
2 changed files with 3 additions and 6 deletions

View File

@ -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));
}
}

View File

@ -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() {