MCPcopy Create free account
hub / github.com/GJDuck/e9patch / fix

Function fix

src/e9patch/e9mapping.cpp:385–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 */
384template <typename Key>
385static void fix(Radix::Node<Key> *node)
386{
387 Key key = ~(Key)0;
388
389 for (unsigned i = 0; i < BRANCH_MAX; i++)
390 {
391 Radix::Node<Key> *child = node->child[i];
392 if (child == nullptr)
393 continue;
394 key = (key & child->key);
395 }
396
397 node->key = key;
398}
399
400/*
401 * Find the leaf node for the given key.

Callers 2

insertFunction · 0.70
removeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected