mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
rogueviz:: do_cleanup as a separate function
This commit is contained in:
parent
4af75fe611
commit
03f55aa372
@ -918,6 +918,13 @@ int search_for = -1;
|
||||
|
||||
vector<reaction_t> cleanup;
|
||||
|
||||
void do_cleanup() {
|
||||
while(!cleanup.empty()) {
|
||||
cleanup.back()();
|
||||
cleanup.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
void close() {
|
||||
search_for = -1;
|
||||
for(int i=0; i<isize(vdata); i++)
|
||||
@ -930,10 +937,7 @@ void close() {
|
||||
anygraph::coords.clear();
|
||||
callhooks(hooks_close);
|
||||
edgetypes.clear();
|
||||
while(!cleanup.empty()) {
|
||||
cleanup.back()();
|
||||
cleanup.pop_back();
|
||||
}
|
||||
do_cleanup();
|
||||
relmatrices.clear();
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,8 @@ namespace rogueviz {
|
||||
void storeall(int from = 0);
|
||||
|
||||
extern vector<reaction_t> cleanup;
|
||||
|
||||
void do_cleanup();
|
||||
|
||||
template<class T, class U> void rv_hook(hookset<T>& m, int prio, U&& hook) {
|
||||
int p = addHook(m, prio, hook);
|
||||
|
Loading…
Reference in New Issue
Block a user