summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-22 14:11:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-22 14:11:31 +0200
commit6c7361b97dfd90470c8c2923a852aff17970a5ed (patch)
treecd35f62451432879f6be2ffcfb42a7da83648e73
parent6c71102493c73d8cd284d0f18ac14743903ff8eb (diff)
compat/util: this macro shouldn't be an instruction
-rw-r--r--compat/util.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/util.hpp b/compat/util.hpp
index 5a7ccd86..a6bf5113 100644
--- a/compat/util.hpp
+++ b/compat/util.hpp
@@ -16,7 +16,7 @@
#define progn(...) (([&]() { __VA_ARGS__ })())
#define prog1(x, ...) (([&]() { auto _ret1324 = (x); do { __VA_ARGS__; } while (0); return _ret1324; })())
-#define once_only(...) progn(static bool once = false; if (!once) { once = true; __VA_ARGS__; })
+#define once_only(...) do { static bool once = false; if (!once) { once = true; __VA_ARGS__; } } while(false)
#define load_time_value(x) \
progn( \
static const auto _value132((x)); \