diff options
author | John Reck <jreck@google.com> | 2014-03-14 18:38:24 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-03-14 18:38:24 -0700 |
commit | b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80 (patch) | |
tree | b52ae926f19306879e1bc852b2bffe97a84c417a /framesequence | |
parent | 6a005419e50275062d97711ce8402b5d71940c81 (diff) | |
download | android_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.tar.gz android_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.tar.bz2 android_frameworks_ex-b5fb6d0f18fed511256fd3aa07bb3eccbbb15f80.zip |
Fix ALOG_ASSERT
Change-Id: I3484aa7b62ad883a94ef68ec2c65841716d85a2c
Diffstat (limited to 'framesequence')
-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 |