mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 20:39:18 +02:00
network fixes and improvements, code refactoring
This commit is contained in:
10
Names.h
10
Names.h
@@ -46,8 +46,16 @@ public:
|
||||
auto lookup = m_itemmap.find( Name );
|
||||
if (lookup == m_itemmap.end())
|
||||
return;
|
||||
|
||||
delete m_items[lookup->second];
|
||||
|
||||
detach(Name);
|
||||
}
|
||||
void detach (std::string const &Name)
|
||||
{
|
||||
auto lookup = m_itemmap.find( Name );
|
||||
if (lookup == m_itemmap.end())
|
||||
return;
|
||||
|
||||
m_items[lookup->second] = nullptr;
|
||||
// TBD, TODO: remove from m_items?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user