diff options
Diffstat (limited to 'src/Dictionary.cpp')
| -rw-r--r-- | src/Dictionary.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp index 6009ea4..98eeb93 100644 --- a/src/Dictionary.cpp +++ b/src/Dictionary.cpp | |||
| @@ -49,7 +49,7 @@ Dictionary::Dictionary(plist_t node, Node* parent) : Structure(parent) | |||
| 49 | free(it); | 49 | free(it); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | Dictionary::Dictionary(PList::Dictionary& d) : Structure() | 52 | Dictionary::Dictionary(const PList::Dictionary& d) : Structure() |
| 53 | { | 53 | { |
| 54 | for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++) | 54 | for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++) |
| 55 | { | 55 | { |
| @@ -115,7 +115,7 @@ Dictionary::~Dictionary() | |||
| 115 | _map.clear(); | 115 | _map.clear(); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | Node* Dictionary::Clone() | 118 | Node* Dictionary::Clone() const |
| 119 | { | 119 | { |
| 120 | return new Dictionary(*this); | 120 | return new Dictionary(*this); |
| 121 | } | 121 | } |
| @@ -140,7 +140,7 @@ 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::Set(const std::string& key, Node* node) | 143 | Dictionary::iterator Dictionary::Set(const std::string& key, const Node* node) |
| 144 | { | 144 | { |
| 145 | if (node) | 145 | if (node) |
| 146 | { | 146 | { |
| @@ -154,6 +154,11 @@ Dictionary::iterator Dictionary::Set(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::Set(const std::string& key, const Node& node) | ||
| 158 | { | ||
| 159 | return Set(key, &node); | ||
| 160 | } | ||
| 161 | |||
| 157 | Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) | 162 | Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) |
| 158 | { | 163 | { |
| 159 | return this->Set(key, node); | 164 | return this->Set(key, node); |
