summaryrefslogtreecommitdiffstats
path: root/src/Dictionary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dictionary.cpp')
-rw-r--r--src/Dictionary.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp
index 6fd45e6..6009ea4 100644
--- a/src/Dictionary.cpp
+++ b/src/Dictionary.cpp
@@ -140,13 +140,13 @@ Dictionary::iterator Dictionary::Find(const std::string& key)
140 return _map.find(key); 140 return _map.find(key);
141} 141}
142 142
143Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) 143Dictionary::iterator Dictionary::Set(const std::string& key, Node* node)
144{ 144{
145 if (node) 145 if (node)
146 { 146 {
147 Node* clone = node->Clone(); 147 Node* clone = node->Clone();
148 UpdateNodeParent(clone); 148 UpdateNodeParent(clone);
149 plist_dict_insert_item(_node, key.c_str(), clone->GetPlist()); 149 plist_dict_set_item(_node, key.c_str(), clone->GetPlist());
150 delete _map[key]; 150 delete _map[key];
151 _map[key] = clone; 151 _map[key] = clone;
152 return _map.find(key); 152 return _map.find(key);
@@ -154,6 +154,11 @@ Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
154 return iterator(this->_map.end()); 154 return iterator(this->_map.end());
155} 155}
156 156
157Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
158{
159 return this->Set(key, node);
160}
161
157void Dictionary::Remove(Node* node) 162void Dictionary::Remove(Node* node)
158{ 163{
159 if (node) 164 if (node)