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

Function find

src/e9patch/e9mapping.cpp:404–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402 */
403template <typename Key>
404static Radix::Node<Key> *find(Radix::Node<Key> *node, Key key)
405{
406 while (true)
407 {
408 if (node == nullptr)
409 return nullptr;
410 if (!node->inner)
411 return (node->key == key? node: nullptr);
412 unsigned idx = index(node, key);
413 node = node->child[idx];
414 }
415}
416
417/*
418 * Find any leaf node matching (key & leaf->key) == 0.

Callers 1

mergeFunction · 0.85

Calls 1

indexFunction · 0.85

Tested by

no test coverage detected