Commit 530b92ff authored by Volker Krause's avatar Volker Krause
Browse files

Make JNI_PP_NARG() work with empty __VA_ARGS__

parent 44a6f24c
Pipeline #183669 passed with stage
in 1 minute and 26 seconds
......@@ -25,6 +25,7 @@ if (NOT ANDROID)
endif()
generate_export_header(KAndroidExtras BASE_NAME KAndroidExtras)
target_compile_features(KAndroidExtras PUBLIC cxx_std_20) # for __VA_OPT__
target_link_libraries(KAndroidExtras PUBLIC Qt::Core)
if (ANDROID)
......
......@@ -13,7 +13,7 @@
///@cond internal
// determine how many elements are in __VA_ARGS__
#define JNI_PP_NARG(...) JNI_PP_NARG_(__VA_ARGS__, JNI_PP_RSEQ_N())
#define JNI_PP_NARG(...) JNI_PP_NARG_(__VA_ARGS__ __VA_OPT__(,) JNI_PP_RSEQ_N())
#define JNI_PP_NARG_(...) JNI_PP_ARG_N(__VA_ARGS__)
#define JNI_PP_ARG_N(_1, _2, _3, _4, _5, _6, _7, N, ...) N
#define JNI_PP_RSEQ_N() 7, 6, 5, 4, 3, 2, 1, 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment