Make SkASSERT not break build in constexpr GrSwizzle method on GCC
Change-Id: I042b90e7c405505447662e6d187ca1519efd4743 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221342 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
5509102043
commit
2935638a1b
@ -117,7 +117,9 @@ constexpr float GrSwizzle::ComponentIndexToFloat(const SkPMColor4f& color, int i
|
||||
if (idx == CToI('0')) {
|
||||
return 1.0f;
|
||||
}
|
||||
SkASSERT(false);
|
||||
bool failed = true; // Using this var allows SkASSERT() to be used on GCC.
|
||||
(void)failed; // Otherwise unused in release build.
|
||||
SkASSERT(!failed);
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user