mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count the number of arguments, we can now use MOZ_ARG_COUNT directly for that. --HG-- extra : rebase_source : 1064e4cc231863dc4aff83ee6bc90d318b4be418
This commit is contained in:
parent
38a6de0fe3
commit
8914ace4ce
@ -315,7 +315,7 @@ MOZ_CrashPrintf(const char* aFilename, int aLine, const char* aFormat, ...);
|
||||
#define MOZ_CRASH_UNSAFE_PRINTF(format, ...) \
|
||||
do { \
|
||||
static_assert( \
|
||||
MOZ_PASTE_PREFIX_AND_ARG_COUNT(, __VA_ARGS__) <= sPrintfMaxArgs, \
|
||||
MOZ_ARG_COUNT(__VA_ARGS__) <= sPrintfMaxArgs, \
|
||||
"Only up to 4 additional arguments are allowed!"); \
|
||||
static_assert(sizeof(format) <= sPrintfCrashReasonSize, \
|
||||
"The supplied format string is too long!"); \
|
||||
|
@ -156,9 +156,7 @@ NS_CI_INTERFACE_GETTER_NAME(_class)(uint32_t *count, nsIID ***array) \
|
||||
}
|
||||
|
||||
#define NS_IMPL_CI_INTERFACE_GETTER(aClass, ...) \
|
||||
NS_CLASSINFO_HELPER_BEGIN(aClass, \
|
||||
MOZ_PASTE_PREFIX_AND_ARG_COUNT(/* No prefix */, \
|
||||
__VA_ARGS__)) \
|
||||
NS_CLASSINFO_HELPER_BEGIN(aClass, MOZ_ARG_COUNT(__VA_ARGS__)) \
|
||||
MOZ_FOR_EACH(NS_CLASSINFO_HELPER_ENTRY, (), (__VA_ARGS__)) \
|
||||
NS_CLASSINFO_HELPER_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user