fix SkASSERT for Visual Studio

Changing colons to parens permits
the error to be recognized, so that
clicking on it goes to the source
line with the assert.

R=reed@google.com

Change-Id: Ifec7fc0633e8ecf0f670418fefaf8ca87ee3d498
Reviewed-on: https://skia-review.googlesource.com/16485
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
This commit is contained in:
Cary Clark 2017-05-11 09:12:57 -04:00 committed by Skia Commit-Bot
parent b60acfcfac
commit a9d9ab3683

View File

@ -131,11 +131,20 @@
# define SK_DUMP_GOOGLE3_STACK()
#endif
#ifdef SK_BUILD_FOR_WIN
// permits visual studio to follow error back to source
#define SK_DUMP_LINE_FORMAT(message) \
SkDebugf("%s(%d): fatal error: \"%s\"\n", __FILE__, __LINE__, message)
#else
#define SK_DUMP_LINE_FORMAT(message) \
SkDebugf("%s:%d: fatal error: \"%s\"\n", __FILE__, __LINE__, message)
#endif
#ifndef SK_ABORT
# define SK_ABORT(message) \
do { \
SkNO_RETURN_HINT(); \
SkDebugf("%s:%d: fatal error: \"%s\"\n", __FILE__, __LINE__, message); \
SK_DUMP_LINE_FORMAT(message); \
SK_DUMP_GOOGLE3_STACK(); \
sk_abort_no_print(); \
} while (false)