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
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index a0b2a2a..c4b8b26 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -223,8 +223,7 @@
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));
}
}
diff --git a/tools/viewer/sk_app/android/surface_glue_android.cpp b/tools/viewer/sk_app/android/surface_glue_android.cpp
index e871558..9e35407 100644
--- a/tools/viewer/sk_app/android/surface_glue_android.cpp
+++ b/tools/viewer/sk_app/android/surface_glue_android.cpp
@@ -77,13 +77,11 @@
}
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() {