From 6c7361b97dfd90470c8c2923a852aff17970a5ed Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 22 Sep 2017 14:11:31 +0200 Subject: compat/util: this macro shouldn't be an instruction --- compat/util.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compat') 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)); \ -- cgit v1.2.3