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

Function clamp_max_nodes

src/ui/layout3d.c:199–208  ·  view source on GitHub ↗

The default is a default, not a ceiling: an explicit request is honored up * to the (env-adjustable) ceiling; only a missing/invalid request falls back * to DEFAULT_MAX_NODES. */

Source from the content-addressed store, hash-verified

197 * to the (env-adjustable) ceiling; only a missing/invalid request falls back
198 * to DEFAULT_MAX_NODES. */
199static int clamp_max_nodes(int requested) {
200 int cap = render_node_limit();
201 if (requested <= 0) {
202 requested = DEFAULT_MAX_NODES;
203 }
204 if (requested > cap) {
205 return cap;
206 }
207 return requested;
208}
209
210/* ── Barnes-Hut Octree ────────────────────────────────────────── */
211

Callers 1

cbm_layout_computeFunction · 0.85

Calls 1

render_node_limitFunction · 0.85

Tested by

no test coverage detected