Skip to content

Delete the code behind three macros nobody defines - #697

Merged
majcosta merged 1 commit into
1dot13:masterfrom
majcosta:dead_macro_cleanup
Aug 22, 2026
Merged

Delete the code behind three macros nobody defines#697
majcosta merged 1 commit into
1dot13:masterfrom
majcosta:dead_macro_cleanup

Conversation

@majcosta

Copy link
Copy Markdown
Collaborator

NETWORKED, BOUNDS_CHECKER and UBMODSHADYJOB are not defined in any source file, in CMakeLists.txt, or on any command line, so all 26 guarded sites were dead. NETWORKED is the most thoroughly dead of the three: its blocks include Networking.h, NetworkEvent.h, Communication.h and Application Msg.h, none of which exist in this repository, so that code could not have compiled since long before the CMake build. Multiplayer went through Multiplayer/ and RakNet instead. UBMODSHADYJOB was referenced by a stale comment pointing at builddefines.h, which is how it turned up.

Removed with unifdef, so the surviving branch of each conditional is kept: the #ifndef BOUNDS_CHECKER bodies stay, and so does the #else of UBMODSHADYJOB.

The compiler never saw any of this, so nothing shrinks: no object file's section sizes change, and the only difference in the executables is 24 to 64 assert line numbers shifting by the number of lines removed above them.

NETWORKED, BOUNDS_CHECKER and UBMODSHADYJOB are not defined in any source file,
in CMakeLists.txt, or on any command line, so all 26 guarded sites were dead.
NETWORKED is the most thoroughly dead of the three: its blocks include
Networking.h, NetworkEvent.h, Communication.h and Application Msg.h, none of
which exist in this repository, so that code could not have compiled since long
before the CMake build. Multiplayer went through Multiplayer/ and RakNet
instead. UBMODSHADYJOB was referenced by a stale comment pointing at
builddefines.h, which is how it turned up.

Removed with unifdef, so the surviving branch of each conditional is kept: the
#ifndef BOUNDS_CHECKER bodies stay, and so does the #else of UBMODSHADYJOB.

The compiler never saw any of this, so nothing shrinks: no object file's
section sizes change, and the only difference in the executables is 24 to 64
assert line numbers shifting by the number of lines removed above them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@majcosta
majcosta merged commit ddb6913 into 1dot13:master Aug 22, 2026
6 checks passed
@majcosta
majcosta deleted the dead_macro_cleanup branch August 22, 2026 05:00
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