| 377 | } |
| 378 | |
| 379 | bool RemoveData(const TYPE* name, const DATA& data) |
| 380 | { |
| 381 | assert(name != nullptr); |
| 382 | |
| 383 | if (mnSize == 0) |
| 384 | { |
| 385 | return false; |
| 386 | } |
| 387 | |
| 388 | size_t hash = TRAITS::Hash(name); |
| 389 | size_t bucket = GetBucket(hash); |
| 390 | node_t* p = mpBuckets[bucket]; |
| 391 | |
| 392 | while (p) |
| 393 | { |
| 394 | if ((p->hash == hash) && TRAITS::Equal(p->name, name) && (p->data == data)) |
| 395 | { |
| 396 | EraseNode(bucket, p); |
| 397 | DeleteNode(p); |
| 398 | --mnCount; |
| 399 | return true; |
| 400 | } |
| 401 | |
| 402 | p = p->next; |
| 403 | } |
| 404 | |
| 405 | return false; |
| 406 | } |
| 407 | |
| 408 | bool exists(const TYPE* name) const |
| 409 | { |
nothing calls this directly
no outgoing calls
no test coverage detected