]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Document intent
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Sep 2015 01:47:29 +0000 (11:47 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Sep 2015 01:47:29 +0000 (11:47 +1000)
qcsrc/common/util-post.qh

index dd20cf8f5da131de57e761e7d8f04129ebc90684..f796b6ebda6109c169700f78dae37989464819d6 100644 (file)
@@ -3,12 +3,15 @@
 
 [[alias("self")]] entity __self;
 
-#define WITH(type, name, value, block) do { \
+// Can't wrap with do-while as block may contain continue or break
+#define WITH(type, name, value, block) { \
     type __with_save = (name); \
     name = (value); \
     LAMBDA(block) \
     name = __with_save; \
-} while (0)
+} do { } while (0)
+
+// Transition from global 'self' to local 'this'
 
 // Step 1: auto oldself
 #if 1
@@ -33,6 +36,7 @@ entity getself() { return self; }
 #endif
 
 // Step 4: enable when possible
+// TODO: Remove SELFPARAM in favor of a parameter
 #if 0
 #define SELFPARAM() noref const entity this = __self
 #define self this