MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / find_node_index

Function find_node_index

src/ui/layout3d.c:488–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static int find_node_index(const node_id_entry_t *map, int count, int64_t id) {
489 int lo = 0;
490 int hi = count - SKIP_ONE;
491 while (lo <= hi) {
492 int mid = lo + (hi - lo) / PAIR_LEN;
493 if (map[mid].id == id) {
494 return map[mid].idx;
495 }
496 if (map[mid].id < id) {
497 lo = mid + SKIP_ONE;
498 } else {
499 hi = mid - SKIP_ONE;
500 }
501 }
502 return CBM_NOT_FOUND;
503}
504
505/* ── Public API ───────────────────────────────────────────────── */
506

Callers 1

cbm_layout_computeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected