MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / RemoveData

Method RemoveData

src/base/AFStringPod.hpp:379–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected