deprecated plist_dict_insert_item in favor of plist_dict_set_item

This commit is contained in:
Nikias Bassen
2014-03-19 02:32:57 +01:00
parent f9299fa80a
commit 6b719ecda2
4 changed files with 21 additions and 10 deletions
+7 -2
View File
@@ -140,13 +140,13 @@ Dictionary::iterator Dictionary::Find(const std::string& key)
return _map.find(key);
}
Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
Dictionary::iterator Dictionary::Set(const std::string& key, Node* node)
{
if (node)
{
Node* clone = node->Clone();
UpdateNodeParent(clone);
plist_dict_insert_item(_node, key.c_str(), clone->GetPlist());
plist_dict_set_item(_node, key.c_str(), clone->GetPlist());
delete _map[key];
_map[key] = clone;
return _map.find(key);
@@ -154,6 +154,11 @@ Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
return iterator(this->_map.end());
}
Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
{
return this->Set(key, node);
}
void Dictionary::Remove(Node* node)
{
if (node)