Add AnyMap::erase method

This commit is contained in:
Ray Speth 2019-01-11 18:54:06 -05:00
parent 0264c66f79
commit 3251a3533e
2 changed files with 7 additions and 0 deletions

View file

@ -240,6 +240,8 @@ public:
bool hasKey(const std::string& key) const;
void erase(const std::string& key);
//! Return a string listing the keys in this AnyMap, e.g. for use in error
//! messages
std::string keys_str() const;

View file

@ -590,6 +590,11 @@ bool AnyMap::hasKey(const std::string& key) const
return (m_data.find(key) != m_data.end());
}
void AnyMap::erase(const std::string& key)
{
m_data.erase(key);
}
std::string AnyMap::keys_str() const
{
fmt::memory_buffer b;