Skip to content

Remove dead ENABLE_ALTROUTING preprocessor branches in botlib#57

Draft
cursor[bot] wants to merge 1 commit intomainfrom
cursor/stale-feature-flag-cleanup-6dd9
Draft

Remove dead ENABLE_ALTROUTING preprocessor branches in botlib#57
cursor[bot] wants to merge 1 commit intomainfrom
cursor/stale-feature-flag-cleanup-6dd9

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor bot commented Apr 11, 2026

Summary

Removes a stale compile-time feature gate in AAS alternative routing. The macro was always defined, so the disabled branch was dead code.

Flags removed

  • ENABLE_ALTROUTING (compile-time macro in be_aas_routealt.c)

Why it is safe to delete

  • The macro was #defined unconditionally at the top of every copy of be_aas_routealt.c (src/botlib/, src/platform/botlib/, src/platform/win32/botlib/). Nothing in the tree ever undefines it or builds without it.
  • The #ifndef ENABLE_ALTROUTING path (return 0 stub and empty init/shutdown) therefore never compiled in any shipped configuration.
  • Removing the guards preserves the only path that could ever run: full alternative route goal computation and buffer allocation.

Behavioral parity checks performed

  • ./scripts/compile_engine.sh opengl (Release) — succeeded.
  • ctest in build-gl-Release — all 17 tests passed (smoke, renderer regression check, unit tests).

Files

  • src/botlib/be_aas_routealt.c
  • src/platform/botlib/be_aas_routealt.c
  • src/platform/win32/botlib/be_aas_routealt.c
Open in Web View Automation 

ENABLE_ALTROUTING was unconditionally defined in every copy of
be_aas_routealt.c, so the #ifndef path never compiled. Drop the macro
and preprocessor guards to keep the always-on alternative routing path
only.

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant