Skip to content

chore: remove dead tryPoolFallback constant in antDepositFood #157

@LightAxe

Description

@LightAxe

Location

src/sim/ant/ant-system.ts line 548

Description

antDepositFood declares:

const tryPoolFallback = true;
if (tryPoolFallback && remaining > 0) {
  // entrance-pool fallback deposit path

tryPoolFallback is always true — the condition simplifies to if (remaining > 0). The variable was introduced as a version-gate placeholder when the pool fallback path was made unconditional (the comment above it references "Issue #68 (v12+) — pre-v12 this was an else branch"), but the boolean flag was never removed.

Impact

No runtime impact. The name tryPoolFallback implies a togglable gate, misleading any reader into thinking there is a path where the pool fallback is skipped. The dead constant also creates noise in the logical structure of the deposit function.

Fix

Remove const tryPoolFallback = true and replace if (tryPoolFallback && remaining > 0) with if (remaining > 0).

Severity

Low — cleanup / dead code. No behaviour change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions