diff options
author | John Reck <jreck@google.com> | 2014-06-23 20:45:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-23 20:45:33 +0000 |
commit | cc9d3ec81ce751e1b924d8e659e17df3628f73c5 (patch) | |
tree | 409c960b26e76e2b3d356ca567514b885fa69fb1 | |
parent | 87e32715f91b39aa4a432f07e845d7879207279e (diff) | |
parent | bbeed6726cd11a0285a59225605c4ae33ee25257 (diff) | |
download | android_frameworks_ex-cc9d3ec81ce751e1b924d8e659e17df3628f73c5.tar.gz android_frameworks_ex-cc9d3ec81ce751e1b924d8e659e17df3628f73c5.tar.bz2 android_frameworks_ex-cc9d3ec81ce751e1b924d8e659e17df3628f73c5.zip |
am bbeed672: Merge "Fix ALOG_ASSERT"
* commit 'bbeed6726cd11a0285a59225605c4ae33ee25257':
Fix ALOG_ASSERT
-rw-r--r-- | framesequence/jni/utils/log.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/framesequence/jni/utils/log.h b/framesequence/jni/utils/log.h index 5e15f30..d8441dc 100644 --- a/framesequence/jni/utils/log.h +++ b/framesequence/jni/utils/log.h @@ -267,6 +267,20 @@ extern "C" { if (__android_log_assert(ANDROID_##priority, tag)) #endif +/* Returns 2nd arg. Used to substitute default value if caller's vararg list + * is empty. + */ +#define __android_second(dummy, second, ...) second + +/* If passed multiple args, returns ',' followed by all but 1st arg, otherwise + * returns nothing. + */ +#define __android_rest(first, ...) , ## __VA_ARGS__ + +#define android_printAssert(cond, tag, fmt...) \ + __android_log_assert(cond, tag, \ + __android_second(0, ## fmt, NULL) __android_rest(fmt)) + #ifdef __cplusplus } #endif |