Skip to content
Permalink
Browse files

Merge commit '0529122' into eurolite-pro-mk2

  • Loading branch information...
aroffringa committed Jun 17, 2019
2 parents c7d10eb + 0529122 commit 49c7849b89b898308172ccc2bf522af24ded0367
Showing with 7 additions and 7 deletions.
  1. +5 −5 olad/plugin_api/UniverseStore.cpp
  2. +2 −2 olad/plugin_api/UniverseStore.h
@@ -104,27 +104,27 @@ void UniverseStore::DeleteAll() {
SaveUniverseSettings(iter->second);
delete iter->second;
}
m_deletion_candiates.clear();
m_deletion_candidates.clear();
m_universe_map.clear();
}

void UniverseStore::AddUniverseGarbageCollection(Universe *universe) {
m_deletion_candiates.insert(universe);
m_deletion_candidates.insert(universe);
}

void UniverseStore::GarbageCollectUniverses() {
set<Universe*>::iterator iter;
UniverseMap::iterator map_iter;

for (iter = m_deletion_candiates.begin();
iter != m_deletion_candiates.end(); iter++) {
for (iter = m_deletion_candidates.begin();
iter != m_deletion_candidates.end(); iter++) {
if (!(*iter)->IsActive()) {
SaveUniverseSettings(*iter);
m_universe_map.erase((*iter)->UniverseId());
delete *iter;
}
}
m_deletion_candiates.clear();
m_deletion_candidates.clear();
}


@@ -98,8 +98,8 @@ class UniverseStore {
Preferences *m_preferences;
ExportMap *m_export_map;
UniverseMap m_universe_map;
std::set<Universe*> m_deletion_candiates; // list of universes we may be
// able to delete
std::set<Universe*> m_deletion_candidates; // list of universes we may be
// able to delete
Clock m_clock;

bool RestoreUniverseSettings(Universe *universe) const;

0 comments on commit 49c7849

Please sign in to comment.
You can’t perform that action at this time.