Returns true if value existed previously
| 226 | |
| 227 | // Returns true if value existed previously |
| 228 | bool put(const KeyType& key, const ValueType& value) |
| 229 | { |
| 230 | TreeAccessor treeAccessor(&tree); |
| 231 | |
| 232 | if (treeAccessor.locate(key)) |
| 233 | { |
| 234 | treeAccessor.current()->second = value; |
| 235 | return true; |
| 236 | } |
| 237 | |
| 238 | KeyValuePair* var = FB_NEW_POOL(getPool()) KeyValuePair(getPool(), key, value); |
| 239 | tree.add(var); |
| 240 | mCount++; |
| 241 | return false; |
| 242 | } |
| 243 | |
| 244 | // Returns pointer to the added empty value or null when key already exists |
| 245 | ValueType* put(const KeyType& key) |
no test coverage detected