From 497f5e2303ea7803de85c2f44072acf0c3f71f5b Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 28 Oct 2015 13:36:04 +1100 Subject: [PATCH] With: allow in short if-else statements --- qcsrc/lib/misc.qh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qcsrc/lib/misc.qh b/qcsrc/lib/misc.qh index f6abd8e33..692ef2553 100644 --- a/qcsrc/lib/misc.qh +++ b/qcsrc/lib/misc.qh @@ -28,15 +28,14 @@ #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) -- 2.39.2