last set of fixes for UE

This commit is contained in:
2024-12-15 19:54:27 -05:00
parent a6143e12b4
commit b027778328
5 changed files with 113 additions and 99 deletions

View File

@ -86,14 +86,16 @@
#define stringize( ... ) stringize_va( __VA_ARGS__ )
#endif
#ifndef do_once
#define do_once() \
static int __do_once_counter_##__LINE__ = 0; \
for(; __do_once_counter_##__LINE__ != 1; __do_once_counter_##__LINE__ = 1 ) \
#define src_line_str stringize(__LINE__)
#define do_once_defer( expression ) \
static int __do_once_counter_##__LINE__ = 0; \
for(; __do_once_counter_##__LINE__ != 1; __do_once_counter_##__LINE__ = 1, (expression)) \
#ifndef do_once
#define do_once() \
static int __do_once_counter_##src_line_str = 0; \
for(; __do_once_counter_##src_line_str != 1; __do_once_counter_##src_line_str = 1 ) \
#define do_once_defer( expression ) \
static int __do_once_counter_##src_line_str = 0; \
for(; __do_once_counter_##src_line_str != 1; __do_once_counter_##src_line_str = 1, (expression)) \
#define do_once_start \
do \