diff options
author | Mike Klein <mtklein@chromium.org> | 2017-06-30 11:04:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-30 16:54:24 +0000 |
commit | 9f183505acc94a587e71b485761f47781d6f5030 (patch) | |
tree | c2b521334deb9e8a1a7adf03fae6e0c9aff2f7e6 /src/core | |
parent | 80fa7cea93974b0480f35f7a5260ce78ba50420f (diff) |
clean up GCC 6.3 workaround
This is all kind of silly... this is just a little bit of code that's
not really reachable, but there to satisfy compilers that can't figure
that out.
Change-Id: Ib39e8bf0fd26e28541cfad37c7ea135a30dbe85a
Reviewed-on: https://skia-review.googlesource.com/21365
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkRecord.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h index 1360f358b3..088975bc16 100644 --- a/src/core/SkRecord.h +++ b/src/core/SkRecord.h @@ -165,7 +165,8 @@ private: switch(this->type()) { SK_RECORD_TYPES(CASE) } #undef CASE SkDEBUGFAIL("Unreachable"); - return f(SkRecords::NoOp()); + static const SkRecords::NoOp noop{}; + return f(noop); } // Mutate this record with functor F (see public API above). @@ -175,7 +176,8 @@ private: switch(this->type()) { SK_RECORD_TYPES(CASE) } #undef CASE SkDEBUGFAIL("Unreachable"); - return f((SkRecords::NoOp*)nullptr); + static const SkRecords::NoOp noop{}; + return f(const_cast<SkRecords::NoOp*>(&noop)); } }; |