Update TRY macro to allow for use without second argument

This commit is contained in:
Pengfei
2021-08-30 20:03:27 +08:00
parent 8e3d48c743
commit d90c858715
+2 -2
View File
@@ -19,9 +19,9 @@
#define CONCAT2(x, y) DO_CONCAT2(x, y)
#define DO_CONCAT2(x, y) x##y
#define TRY(x, fail) \
#define TRY(x, ...) \
if (!(x)) { \
fail; \
__VA_ARGS__; \
return false; \
}