diff options
Diffstat (limited to 'src/Dictionary.cpp')
| -rw-r--r-- | src/Dictionary.cpp | 9 |
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 | ||
| 143 | Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) | 143 | Dictionary::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 | ||
| 157 | Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) | ||
| 158 | { | ||
| 159 | return this->Set(key, node); | ||
| 160 | } | ||
| 161 | |||
| 157 | void Dictionary::Remove(Node* node) | 162 | void Dictionary::Remove(Node* node) |
| 158 | { | 163 | { |
| 159 | if (node) | 164 | if (node) |
