- Made ::entity aware of whether an entity is already known, to avoid adding
  when not necessary.
This commit is contained in:
Paul Beckingham 2014-10-31 19:20:09 -04:00
parent d3d3a6a418
commit 6784c8d108

View file

@ -241,9 +241,10 @@ void CLI::alias (const std::string& name, const std::string& value)
}
////////////////////////////////////////////////////////////////////////////////
void CLI::entity (const std::string& name, const std::string& value)
void CLI::entity (const std::string& category, const std::string& name)
{
_entities.insert (std::pair <std::string, std::string> (name, value));
if (_entities.find (category) == _entities.end ())
_entities.insert (std::pair <std::string, std::string> (category, name));
}
////////////////////////////////////////////////////////////////////////////////