mirror of
https://github.com/libimobiledevice/libplist
synced 2026-06-08 15:29:34 +00:00
deprecated plist_dict_insert_item in favor of plist_dict_set_item
This commit is contained in:
+7
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user