diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-02-16 15:22:59 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-02-16 15:22:59 +0100 |
commit | 9847d2c4a8287f220f169236b4fa1962d50d1187 (patch) | |
tree | 69d901c62ead8809b6a812fc542d54a320c26ab5 /include | |
parent | bc2e4018054f494fcba01e6a27a63e151bf1e9a4 (diff) | |
download | astra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.gz astra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.bz2 astra-9847d2c4a8287f220f169236b4fa1962d50d1187.tar.xz astra-9847d2c4a8287f220f169236b4fa1962d50d1187.zip |
Also remove objects from index manager
Diffstat (limited to 'include')
-rw-r--r-- | include/astra/AstraObjectManager.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/astra/AstraObjectManager.h b/include/astra/AstraObjectManager.h index eab3f03..8b9da30 100644 --- a/include/astra/AstraObjectManager.h +++ b/include/astra/AstraObjectManager.h @@ -77,6 +77,13 @@ public: return 0; } + void remove(int index) { + std::map<int, CAstraObjectManagerBase*>::iterator i; + i = m_table.find(index); + if (i != m_table.end()) + m_table.erase(i); + } + private: /** The index last handed out */ @@ -216,7 +223,9 @@ void CAstraObjectManager<T>::remove(int _iIndex) // delete data delete (*it).second; // delete from map - m_mIndexToObject.erase(it); + m_mIndexToObject.erase(it); + + CAstraIndexManager::getSingleton().remove(_iIndex); } //---------------------------------------------------------------------------------------- |