mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-12 04:04:08 +00:00
fix to make it compile in C++11
This commit is contained in:
parent
26e02ce148
commit
e424832f70
2
tour.cpp
2
tour.cpp
@ -1100,7 +1100,7 @@ template<class T> void rv_keep(T& variable) {
|
|||||||
on_cleanup_or_next([backup, &variable] { variable = backup; });
|
on_cleanup_or_next([backup, &variable] { variable = backup; });
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class U> auto autoclear_hook(hookset<T>& m, int prio, U&& hook) {
|
template<class T, class U> reaction_t autoclear_hook(hookset<T>& m, int prio, U&& hook) {
|
||||||
int p = addHook(m, prio, hook);
|
int p = addHook(m, prio, hook);
|
||||||
return [&m, p] { delHook(m, p); };
|
return [&m, p] { delHook(m, p); };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user