]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
With: allow in short if-else statements
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 28 Oct 2015 02:36:04 +0000 (13:36 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 28 Oct 2015 02:36:04 +0000 (13:36 +1100)
qcsrc/lib/misc.qh

index f6abd8e338296e4f55062601cea24b8dddd4b58f..692ef2553f10d9c973a6de7bc37655aacf1f9336 100644 (file)
 
 #define LAMBDA(...) { __VA_ARGS__; }
 
-// Can't wrap with do-while as block may contain continue or break
+// With block may not contain continue or break
 #define WITH(type, name, value, block) \
+       do \
        { \
                type __with_save = (name); \
                name = (value); \
                LAMBDA(block) \
                name = __with_save; \
-       } do \
-       { \
        } \
        while (0)