Add AnyMap::erase method
This commit is contained in:
parent
0264c66f79
commit
3251a3533e
2 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue