From 4bfd58723b6efca37077f05c1ab92a3e85f97eb4 Mon Sep 17 00:00:00 2001 From: mtklein Date: Wed, 3 Dec 2014 08:48:57 -0800 Subject: Decompose a weird assert. I got my hands on a list of new warnings coming out of MSVC when run with /analyze. I scanned over them and didn't see any bugs, but I did notice this is just a weird way to write this expression. (MSVC /analyze was wary of '=' in a boolean expression.) BUG=skia: Review URL: https://codereview.chromium.org/776033002 --- src/utils/SkTextureCompressor_Blitter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h index 3d305017e2..0c26a7a7eb 100644 --- a/src/utils/SkTextureCompressor_Blitter.h +++ b/src/utils/SkTextureCompressor_Blitter.h @@ -309,7 +309,8 @@ public: virtual void blitMask(const SkMask& mask, const SkIRect& clip) SK_OVERRIDE { // Assumptions: - SkASSERT(!fBlitMaskCalled && (fBlitMaskCalled = true)); + SkASSERT(!fBlitMaskCalled); + SkDEBUGCODE(fBlitMaskCalled = true); SkASSERT(SkMask::kA8_Format == mask.fFormat); SkASSERT(mask.fBounds.contains(clip)); -- cgit v1.2.3