mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 18:19:19 +02:00
work
This commit is contained in:
12
Names.h
12
Names.h
@@ -41,6 +41,18 @@ public:
|
||||
{
|
||||
return insert(Item, Item->name());
|
||||
}
|
||||
void purge (std::string const &Name)
|
||||
{
|
||||
auto lookup = m_itemmap.find( Name );
|
||||
if (lookup == m_itemmap.end())
|
||||
return;
|
||||
|
||||
delete m_items[lookup->second];
|
||||
m_items[lookup->second] = nullptr;
|
||||
// TBD, TODO: remove from m_items?
|
||||
|
||||
m_itemmap.erase(lookup);
|
||||
}
|
||||
// locates item with specified name. returns pointer to the item, or nullptr
|
||||
Type_ *
|
||||
find( std::string const &Name ) const {
|
||||
|
||||
Reference in New Issue
Block a user