1
0
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:
Zeno Rogue
2020-02-29 17:58:59 +01:00
parent eb15070ac4
commit e564622a48
17 changed files with 428 additions and 400 deletions

View File

@@ -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()