mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-20 16:37:40 +00:00
rewritten undo: part 1
This commit is contained in:
4
hyper.h
4
hyper.h
@@ -777,6 +777,10 @@ static inline void set_flag(flagtype& f, flagtype which, bool b) {
|
||||
|
||||
}
|
||||
|
||||
/** this macro is used to delay performing the action in case if everything is rolled back */
|
||||
#define LATE(x) \
|
||||
if(changes.on) { changes.at_commit([=] { x; }); return; }
|
||||
|
||||
// assert macro
|
||||
#ifdef NDEBUG
|
||||
#define hassert(condition) if(!condition) __builtin_unreachable()
|
||||
|
Reference in New Issue
Block a user