diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-09-22 14:11:31 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-09-22 14:11:31 +0200 |
commit | 6c7361b97dfd90470c8c2923a852aff17970a5ed (patch) | |
tree | cd35f62451432879f6be2ffcfb42a7da83648e73 /compat/util.hpp | |
parent | 6c71102493c73d8cd284d0f18ac14743903ff8eb (diff) |
compat/util: this macro shouldn't be an instruction
Diffstat (limited to 'compat/util.hpp')
-rw-r--r-- | compat/util.hpp | 2 |
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)); \ |