- // only attempt to remove a map item that exists
- if (this->Extension_Items.find(key) != this->Extension_Items.end())
- {
- this->Extension_Items.erase(this->Extension_Items.find(key));
- log(DEBUG,"Shrinking object with item %s",key.c_str());
- return true;
- }
- return false;
-}
-
-char* Extensible::GetExt(const std::string &key)
-{
- if (this->Extension_Items.find(key) != this->Extension_Items.end())
- {
- return (this->Extension_Items.find(key))->second;
- }
- return NULL;
+ /* map::size_type map::erase( const key_type& key );
+ * returns the number of elements removed, std::map
+ * is single-associative so this should only be 0 or 1
+ */
+ return this->Extension_Items.erase(key);