1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-06-29 16:32:53 +00:00

tour:: slide_backup with 1 parameter

This commit is contained in:
Zeno Rogue 2021-03-31 15:23:40 +02:00
parent 22c3bf8821
commit 21f151cadb

View File

@ -81,6 +81,8 @@ template<class T, class U> void slide_backup(T& what, U value) {
restorers.push_back([&what, backup] { what = backup; }); restorers.push_back([&what, backup] { what = backup; });
what = value; what = value;
} }
template<class T> void slide_backup(T& what) { slide_backup(what, what); }
#endif #endif
EX void on_restore(const reaction_t& t) { EX void on_restore(const reaction_t& t) {