mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Delete the code behind three macros nobody defines
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>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 5
parent
98c1e6a1f5
commit
ddb691318e
@@ -13,10 +13,6 @@
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
|
||||
#ifdef NETWORKED
|
||||
#include "Networking.h"
|
||||
#include "NetworkEvent.h"
|
||||
#endif
|
||||
#include "MemMan.h"
|
||||
#include "Timer Control.h"
|
||||
#include "DEBUG.H"
|
||||
@@ -907,19 +903,11 @@ BOOLEAN AddGameEvent(UINT32 uiEvent, UINT16 usDelay, PTR pEventData)
|
||||
if (usDelay == DEMAND_EVENT_DELAY)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(AddGameEventToQueue(uiEvent, 0, pEventData, DEMAND_EVENT_QUEUE));
|
||||
}
|
||||
else if (uiEvent < EVENTS_LOCAL_AND_NETWORK)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending Local and network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(AddGameEventToQueue(uiEvent, usDelay, pEventData, PRIMARY_EVENT_QUEUE));
|
||||
}
|
||||
else if (uiEvent < EVENTS_ONLY_USED_LOCALLY)
|
||||
@@ -930,10 +918,6 @@ BOOLEAN AddGameEvent(UINT32 uiEvent, UINT16 usDelay, PTR pEventData)
|
||||
else if (uiEvent < EVENTS_ONLY_SENT_OVER_NETWORK)
|
||||
{
|
||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String("AddGameEvent: Sending network #%d", uiEvent));
|
||||
#ifdef NETWORKED
|
||||
if (gfAmINetworked)
|
||||
SendEventToNetwork(uiEvent, usDelay, pEventData);
|
||||
#endif
|
||||
return(TRUE);
|
||||
}
|
||||
// There is an error with the event
|
||||
|
||||
@@ -235,7 +235,6 @@ void CALLBACK TimeProc( UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2
|
||||
timerDone |= UpdateTimeCounter( giTimerCustomizable, iTimeLeft );
|
||||
}
|
||||
|
||||
#ifndef BOUNDS_CHECKER
|
||||
|
||||
// If mapscreen...
|
||||
if( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN )
|
||||
@@ -274,7 +273,6 @@ void CALLBACK TimeProc( UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user