diff options
author | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-28 14:59:50 +0000 |
---|---|---|
committer | tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-12-28 14:59:50 +0000 |
commit | 0c00f21fee3f5cfa3aa7e5d46ff94cb8cf340451 (patch) | |
tree | 2a6e633dbd4bcb8bb5cd308caaa667c8163dbf30 /include/core | |
parent | 6f6e8c39a7b07f8a916a60ad27f17bd13f3c89ad (diff) |
Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");
catch a couple of latent SkASSERT("text") bugs.
http://codereview.appspot.com/5504090/
git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkScalar.h | 2 | ||||
-rw-r--r-- | include/core/SkTypes.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h index d5cd718652..71aad98919 100644 --- a/include/core/SkScalar.h +++ b/include/core/SkScalar.h @@ -92,7 +92,7 @@ * * Either way, it's not good. */ - SkASSERT(!"looks like you passed an SkScalar into SkIntToScalar"); + SkDEBUGFAIL("looks like you passed an SkScalar into SkIntToScalar"); return (float)0; } #else // not SK_DEBUG diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 51d8d187c7..a5844213d2 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -93,6 +93,7 @@ inline void operator delete(void* p) { #ifdef SK_DEBUG #define SkASSERT(cond) SK_DEBUGBREAK(cond) + #define SkDEBUGFAIL(message) SkASSERT(false && message) #define SkDEBUGCODE(code) code #define SkDECLAREPARAM(type, var) , type var #define SkPARAM(var) , var @@ -101,6 +102,7 @@ inline void operator delete(void* p) { #define SkAssertResult(cond) SkASSERT(cond) #else #define SkASSERT(cond) + #define SkDEBUGFAIL(message) #define SkDEBUGCODE(code) #define SkDEBUGF(args) #define SkDECLAREPARAM(type, var) |