Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
155ff40
refactor: apply clang-tidy modernize-use-nullptr fixes
bobtista Dec 5, 2025
c22ea03
fix: add CppMacros.h include to files using nullptr
bobtista Dec 8, 2025
f17aab9
refactor: convert return NULL to return nullptr
bobtista Dec 14, 2025
78df746
refactor: convert pointer assignments and comparisons from NULL to nu…
bobtista Dec 14, 2025
99322f0
refactor: convert NULL to nullptr in array/struct initializers and te…
bobtista Dec 15, 2025
1e88d7e
fix: correct incorrect nullptr conversions and syntax errors
bobtista Dec 15, 2025
6c349c4
refactor: comment out NULL definitions, use nullptr instead
bobtista Dec 15, 2025
d840a50
refactor: remove unnecessary static_cast from RenderDeviceDescClass c…
bobtista Dec 16, 2025
2da1d87
Revert "refactor: remove unnecessary static_cast from RenderDeviceDes…
bobtista Dec 16, 2025
fc3e44d
refactor: add CppMacros.h to debug/internal.h
bobtista Dec 16, 2025
51fda13
refactor: remove redundant CppMacros.h includes from profile .cpp files
bobtista Dec 16, 2025
a7556a2
refactor: remove redundant CppMacros.h includes from debug .cpp files
bobtista Dec 16, 2025
90e8f0b
fix: convert remaining NULL to nullptr in simpleplayer.cpp
bobtista Dec 16, 2025
7630b22
fix: convert remaining NULL to nullptr in MiniDumper.cpp
bobtista Dec 16, 2025
23ab241
refactor: simplify m_alphaTiles array initialization using zero-initi…
bobtista Dec 16, 2025
67593d2
refactor: simplify pointer array initializations using zero-initializ…
bobtista Dec 16, 2025
c237135
fix: restore nullptr in comment documentation
bobtista Dec 17, 2025
3ba7aad
fix: restore nullptr initialization in CollisionTestClass constructor
bobtista Dec 17, 2025
3686188
fix: add CppMacros.h include for nullptr support in coltest.h
bobtista Dec 17, 2025
0965e01
refactor: remove unnecessary static_cast from RenderDeviceDescClass c…
bobtista Dec 17, 2025
a73031f
refactor: update NULL to nullptr in comments and documentation
bobtista Dec 17, 2025
b45b267
refactor: update remaining NULL to nullptr in comments
bobtista Dec 17, 2025
56fc6de
refactor: update remaining NULL to nullptr in inline comments
bobtista Dec 17, 2025
c20cde2
fix: use {0} instead of {} for array initialization (VC6 compatibility)
bobtista Dec 17, 2025
832b838
refactor: convert NULL to nullptr in dx8wrapper.cpp
bobtista Dec 17, 2025
1464784
refactor: convert NULL_HANDLE macro from NULL to nullptr
bobtista Dec 17, 2025
a0f1242
refactor: convert NULL to nullptr in dx8wrapper.cpp
bobtista Dec 17, 2025
2640a34
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
6c3a871
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
1eed6a6
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
de693f0
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
d33550c
refactor: convert NULL to nullptr in dx8wrapper.cpp
bobtista Dec 17, 2025
6809c8a
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
0acb532
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
bf84285
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
d2e1548
refactor: convert NULL to nullptr in dx8wrapper.cpp
bobtista Dec 17, 2025
fb6038d
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
18b733a
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
2b8a9c3
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
b67a5b9
refactor: convert NULL to nullptr in GeneralsMD Tools files
bobtista Dec 17, 2025
312551d
refactor: convert NULL to nullptr in debug message string literals
bobtista Dec 17, 2025
874b313
refactor: convert NULL to nullptr in Core Tools files
bobtista Dec 17, 2025
79d99e0
refactor: remove unnecessary comment about NULL string literal
bobtista Dec 17, 2025
2ba4210
refactor: update NULL to nullptr in GeneralsMD code and comments
bobtista Dec 17, 2025
ee8e107
refactor: update NULL to nullptr in Generals code and comments
bobtista Dec 17, 2025
46828e2
refactor: update NULL to nullptr in GUIEdit tool comments
bobtista Dec 17, 2025
be4b483
refactor: update NULL to nullptr in WorldBuilder tool comments and as…
bobtista Dec 17, 2025
a13b396
refactor: deprecate NULL definition in WW3D tools headers
bobtista Dec 17, 2025
221fb5f
refactor: update NULL-terminated to null-terminated in comments
bobtista Dec 17, 2025
6250580
refactor: update NULL to nullptr in commented-out code for consistency
bobtista Dec 17, 2025
36b93f8
refactor: update NULL texture comments to null texture in W3DWater
bobtista Dec 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/ArchiveFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class ArchiveFileSystem : public SubsystemInterface
protected:
struct ArchivedDirectoryInfoResult
{
ArchivedDirectoryInfoResult() : dirInfo(NULL) {}
Bool valid() const { return dirInfo != NULL; }
ArchivedDirectoryInfoResult() : dirInfo(nullptr) {}
Bool valid() const { return dirInfo != nullptr; }

ArchivedDirectoryInfo* dirInfo;
AsciiString lastToken; ///< Synonymous for file name if the search directory was a file path
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/AsciiString.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class AsciiString
token was found. (note that this modifies 'this' as well, stripping
the token off!)
*/
Bool nextToken(AsciiString* token, const char* seps = NULL);
Bool nextToken(AsciiString* token, const char* seps = nullptr);

/**
return true iff the string is "NONE" (case-insensitive).
Expand Down Expand Up @@ -420,7 +420,7 @@ inline int AsciiString::getByteCount() const
inline Bool AsciiString::isEmpty() const
{
validate();
return m_data == NULL || peek()[0] == 0;
return m_data == nullptr || peek()[0] == 0;
}

// -----------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/AudioEventInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ struct AudioEventInfo : public MemoryPoolObject

// DynamicAudioEventInfo interfacing functions
virtual Bool isLevelSpecific() const { return false; } ///< If true, this sound is only defined on the current level and can be deleted when that level ends
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() { return NULL; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const { return NULL; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class

/// Is this a permenant sound? That is, if I start this sound up, will it ever end
/// "on its own" or only if I explicitly kill it?
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/Common/GameAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class AudioManager : public SubsystemInterface
AudioManager();
virtual ~AudioManager();
#if defined(RTS_DEBUG)
virtual void audioDebugDisplay(DebugDisplayInterface *dd, void *userData, FILE *fp = NULL ) = 0;
virtual void audioDebugDisplay(DebugDisplayInterface *dd, void *userData, FILE *fp = nullptr ) = 0;
#endif

// From SubsystemInterface
Expand Down Expand Up @@ -395,7 +395,7 @@ class AudioManagerDummy : public AudioManager
virtual AsciiString getMusicTrackName() const { return ""; }
virtual void openDevice() {}
virtual void closeDevice() {}
virtual void* getDevice() { return NULL; }
virtual void* getDevice() { return nullptr; }
virtual void notifyOfAudioCompletion(UnsignedInt audioCompleted, UnsignedInt flags) {}
virtual UnsignedInt getProviderCount(void) const { return 0; };
virtual AsciiString getProviderName(UnsignedInt providerNum) const { return ""; }
Expand All @@ -416,7 +416,7 @@ class AudioManagerDummy : public AudioManager
virtual void removePlayingAudio(AsciiString eventName) {}
virtual void removeAllDisabledAudio() {}
virtual Bool has3DSensitiveStreamsPlaying(void) const { return false; }
virtual void* getHandleForBink(void) { return NULL; }
virtual void* getHandleForBink(void) { return nullptr; }
virtual void releaseHandleForBink(void) {}
virtual void friend_forcePlayAudioEventRTS(const AudioEventRTS* eventToPlay) {}
virtual void setPreferredProvider(AsciiString providerNdx) {}
Expand Down
16 changes: 8 additions & 8 deletions Core/GameEngine/Include/Common/GameMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class MemoryPool
void addToList(MemoryPool **pHead); ///< add this pool to head of the linked list
void removeFromList(MemoryPool **pHead); ///< remove this pool from the linked list
#ifdef MEMORYPOOL_DEBUG
static void debugPoolInfoReport( MemoryPool *pool, FILE *fp = NULL ); ///< dump a report about this pool to the logfile
static void debugPoolInfoReport( MemoryPool *pool, FILE *fp = nullptr ); ///< dump a report about this pool to the logfile
const char *debugGetBlockTagString(void *pBlock); ///< return the tagstring for the given block (assumed to belong to this pool)
void debugMemoryVerifyPool(); ///< perform internal consistency check on this pool.
Int debugPoolReportLeaks( const char* owner );
Expand Down Expand Up @@ -421,7 +421,7 @@ class DynamicMemoryAllocator
Int debugCalcRawBlockBytes(Int *numBlocks); ///< calculate the number of bytes in "raw" (non-subpool) blocks
void debugMemoryVerifyDma(); ///< perform internal consistency check
const char *debugGetBlockTagString(void *pBlock); ///< return the tagstring for the given block (assumed to belong to this dma)
void debugDmaInfoReport( FILE *fp = NULL ); ///< dump a report about this pool to the logfile
void debugDmaInfoReport( FILE *fp = nullptr ); ///< dump a report about this pool to the logfile
Int debugDmaReportLeaks();
#endif
#ifdef MEMORYPOOL_CHECKPOINTING
Expand Down Expand Up @@ -545,7 +545,7 @@ class MemoryPoolFactory
/// destroy the contents of all pools and dmas. (the pools and dma's are not destroyed, just reset)
void reset();

void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = NULL );
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = nullptr );

#ifdef MEMORYPOOL_DEBUG

Expand All @@ -559,7 +559,7 @@ class MemoryPoolFactory
const char *debugGetBlockTagString(void *pBlock);

/// dump a report with the given options to the logfile.
void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = NULL );
void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = nullptr );

void debugSetInitFillerIndex(Int index);

Expand Down Expand Up @@ -589,7 +589,7 @@ private: \
order-of-execution problem for static variables, ensuring this is not executed \
prior to the initialization of TheMemoryPoolFactory. \
*/ \
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL")); \
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is nullptr")); \
static MemoryPool *The##ARGCLASS##Pool = TheMemoryPoolFactory->findMemoryPool(ARGPOOLNAME); \
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)", ARGPOOLNAME)); \
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
Expand All @@ -608,7 +608,7 @@ private: \
order-of-execution problem for static variables, ensuring this is not executed \
prior to the initialization of TheMemoryPoolFactory. \
*/ \
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL")); \
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is nullptr")); \
static MemoryPool *The##ARGCLASS##Pool = TheMemoryPoolFactory->createMemoryPool(ARGPOOLNAME, sizeof(ARGCLASS), ARGINITIAL, ARGOVERFLOW); \
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)", ARGPOOLNAME)); \
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
Expand Down Expand Up @@ -902,9 +902,9 @@ class MemoryPoolObjectHolder
private:
MemoryPoolObject *m_mpo;
public:
MemoryPoolObjectHolder(MemoryPoolObject *mpo = NULL) : m_mpo(mpo) { }
MemoryPoolObjectHolder(MemoryPoolObject *mpo = nullptr) : m_mpo(mpo) { }
void hold(MemoryPoolObject *mpo) { DEBUG_ASSERTCRASH(!m_mpo, ("already holding")); m_mpo = mpo; }
void release() { m_mpo = NULL; }
void release() { m_mpo = nullptr; }
~MemoryPoolObjectHolder() { deleteInstance(m_mpo); }
};

Expand Down
5 changes: 3 additions & 2 deletions Core/GameEngine/Include/Common/GameMemoryNull.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#pragma once
#include <Utility/CppMacros.h>

#define allocateBytes(ARGCOUNT,ARGLITERAL) allocateBytesImplementation(ARGCOUNT)
#define allocateBytesDoNotZero(ARGCOUNT,ARGLITERAL) allocateBytesDoNotZeroImplementation(ARGCOUNT)
Expand Down Expand Up @@ -64,11 +65,11 @@ class MemoryPoolFactory
{
public:

void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = NULL );
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = nullptr );

#ifdef MEMORYPOOL_DEBUG

void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = NULL );
void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = nullptr );
void debugSetInitFillerIndex(Int index);

#endif
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/LocalFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class LocalFile : public File
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
virtual Bool flush(); ///< flush data to disk
virtual void nextLine(Char *buf = NULL, Int bufSize = 0); ///< moves file position to after the next new-line
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves file position to after the next new-line
virtual Bool scanInt(Int &newInt); ///< return what gets read in as an integer at the current file position.
virtual Bool scanReal(Real &newReal); ///< return what gets read in as a float at the current file position.
virtual Bool scanString(AsciiString &newString); ///< return what gets read in as a string at the current file position.
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/RAMFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class RAMFile : public File
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
virtual Bool flush(); ///< flush data to disk
virtual void nextLine(Char *buf = NULL, Int bufSize = 0); ///< moves current position to after the next new-line
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves current position to after the next new-line

virtual Bool scanInt(Int &newInt); ///< return what gets read as an integer from the current memory position.
virtual Bool scanReal(Real &newReal); ///< return what gets read as a float from the current memory position.
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/Radar.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static const char *const RadarPriorityNames[] =
"UNIT", // unit level drawing priority
"LOCAL_UNIT_ONLY", // unit priority, but only on the radar if controlled by the local player

NULL
nullptr
};
static_assert(ARRAY_SIZE(RadarPriorityNames) == RADAR_PRIORITY_NUM_PRIORITIES + 1, "Incorrect array size");
#endif // DEFINE_RADAR_PRIOTITY_NAMES
Expand All @@ -165,7 +165,7 @@ class Radar : public Snapshot,
virtual void update( void ); ///< subsystem per frame update

// is the game window parameter the radar window
Bool isRadarWindow( GameWindow *window ) { return (m_radarWindow == window) && (m_radarWindow != NULL); }
Bool isRadarWindow( GameWindow *window ) { return (m_radarWindow == window) && (m_radarWindow != nullptr); }

Bool radarToWorld( const ICoord2D *radar, Coord3D *world ); ///< radar point to world point on terrain
Bool radarToWorld2D( const ICoord2D *radar, Coord3D *world ); ///< radar point to world point (x,y only!)
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/StreamingArchiveFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class StreamingArchiveFile : public RAMFile
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek

// Ini's should not be parsed with streaming files, that's just dumb.
virtual void nextLine(Char *buf = NULL, Int bufSize = 0) { DEBUG_CRASH(("Should not call nextLine on a streaming file.")); }
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) { DEBUG_CRASH(("Should not call nextLine on a streaming file.")); }
virtual Bool scanInt(Int &newInt) { DEBUG_CRASH(("Should not call scanInt on a streaming file.")); return FALSE; }
virtual Bool scanReal(Real &newReal) { DEBUG_CRASH(("Should not call scanReal on a streaming file.")); return FALSE; }
virtual Bool scanString(AsciiString &newString) { DEBUG_CRASH(("Should not call scanString on a streaming file.")); return FALSE; }
Expand All @@ -99,7 +99,7 @@ class StreamingArchiveFile : public RAMFile
virtual Bool openFromArchive(File *archiveFile, const AsciiString& filename, Int offset, Int size); ///< copy file data from the given file at the given offset for the given size.
virtual Bool copyDataToFile(File *localFile) { DEBUG_CRASH(("Are you sure you meant to copyDataToFile on a streaming file?")); return FALSE; }

virtual char* readEntireAndClose() { DEBUG_CRASH(("Are you sure you meant to readEntireAndClose on a streaming file?")); return NULL; }
virtual char* readEntireAndClose() { DEBUG_CRASH(("Are you sure you meant to readEntireAndClose on a streaming file?")); return nullptr; }
virtual File* convertToRAMFile() { DEBUG_CRASH(("Are you sure you meant to readEntireAndClose on a streaming file?")); return this; }
};

Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/UnicodeString.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ inline int UnicodeString::getByteCount() const
inline Bool UnicodeString::isEmpty() const
{
validate();
return m_data == NULL || peek()[0] == 0;
return m_data == nullptr || peek()[0] == 0;
}

// -----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class File : public MemoryPoolObject
* END: means seek the specified number of bytes back from the end of the file
*/
virtual Bool flush() = 0; ///< flush data to disk
virtual void nextLine(Char *buf = NULL, Int bufSize = 0) = 0; ///< reads until it reaches a new-line character
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) = 0; ///< reads until it reaches a new-line character

virtual Bool scanInt(Int &newInt) = 0; ///< read an integer from the current file position.
virtual Bool scanReal(Real &newReal) = 0; ///< read a real number from the current file position.
Expand Down
14 changes: 7 additions & 7 deletions Core/GameEngine/Include/GameClient/TerrainVisual.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct SeismicSimulationNode
m_region.hi.x = 0;
m_region.hi.y = 0;
m_clean = FALSE;
callbackFilter = NULL;
callbackFilter = nullptr;
m_life = 0;
m_magnitude = DEFAULT_SEISMIC_SIMULATION_MAGNITUDE;

Expand All @@ -95,7 +95,7 @@ struct SeismicSimulationNode
m_magnitude = ssn.m_magnitude;

}
SeismicSimulationNode( const Coord3D* ctr, Real rad, Real mag, SeismicSimulationFilterBase *cbf = NULL )
SeismicSimulationNode( const Coord3D* ctr, Real rad, Real mag, SeismicSimulationFilterBase *cbf = nullptr )
{
m_center.x = REAL_TO_INT_FLOOR(ctr->x/MAP_XY_FACTOR);
m_center.y = REAL_TO_INT_FLOOR(ctr->y/MAP_XY_FACTOR);
Expand All @@ -114,7 +114,7 @@ struct SeismicSimulationNode

SeismicSimulationFilterBase::SeismicSimStatusCode handleFilterCallback( WorldHeightMapInterfaceClass *heightMap )
{
if ( callbackFilter == NULL )
if ( callbackFilter == nullptr )
return SeismicSimulationFilterBase::SEISMIC_STATUS_INVALID;

++m_life;
Expand All @@ -126,7 +126,7 @@ struct SeismicSimulationNode
{
DEBUG_ASSERTCRASH( callbackFilter, ("SeismicSimulationNode::applyGravity() has no callback filter!") );

if ( callbackFilter == NULL )
if ( callbackFilter == nullptr )
return velocityIn;//oops, we have no callback!

return callbackFilter->applyGravityCallback( velocityIn );
Expand Down Expand Up @@ -186,7 +186,7 @@ static const char *const TerrainLODNames[] =
"AUTOMATIC",
"DISABLE",

NULL
nullptr
};
static_assert(ARRAY_SIZE(TerrainLODNames) == TERRAIN_LOD_NUM_TYPES + 1, "Incorrect array size");
#endif // end DEFINE_TERRAIN_LOD_NAMES
Expand Down Expand Up @@ -285,8 +285,8 @@ class TerrainVisual : public Snapshot,
virtual void updateSeismicSimulations( void ) = 0; /// walk the SeismicSimulationList and, well, do it.
virtual void addSeismicSimulation( const SeismicSimulationNode& sim ) = 0;
#endif
virtual WorldHeightMap* getLogicHeightMap( void ) {return NULL;};
virtual WorldHeightMap* getClientHeightMap( void ) {return NULL;};
virtual WorldHeightMap* getLogicHeightMap( void ) {return nullptr;};
virtual WorldHeightMap* getClientHeightMap( void ) {return nullptr;};
////////////////////////////////////////////////////
////////////////////////////////////////////////////
////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/GameNetwork/ConnectionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ class ConnectionManager
void requestFrameDataResend(Int playerID, UnsignedInt frame); ///< request of this player that he send the specified frame's data.

// The connections are set up like the slot list. The connection corresponding to the local
// player's position in the slot list will be NULL. Connections corresponding to slots that
// do not have a player will also be NULL.
// player's position in the slot list will be nullptr. Connections corresponding to slots that
// do not have a player will also be nullptr.
Connection *m_connections[MAX_SLOTS];

Transport *m_transport;
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/GameSpy/PeerThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class PeerRequest
UnsignedInt ladderPassCRC;
Int maxPing;
Int maxDiscons, discons;
char pings[17]; // 8 servers (0-ff), 1 NULL
char pings[17]; // 8 servers (0-ff), 1 null terminator
Int numPlayers;
Int botID;
Int roomID;
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/GameSpyOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "GameClient/GameWindowManager.h"

void ClearGSMessageBoxes( void ); ///< Tear down any GS message boxes (e.g. in case we have a new one to put up)
void GSMessageBoxOk(UnicodeString titleString,UnicodeString bodyString, GameWinMsgBoxFunc okFunc = NULL); ///< Display a Message box with Ok button and track it
void GSMessageBoxOk(UnicodeString titleString,UnicodeString bodyString, GameWinMsgBoxFunc okFunc = nullptr); ///< Display a Message box with Ok button and track it
void GSMessageBoxOkCancel(UnicodeString title, UnicodeString message, GameWinMsgBoxFunc okFunc, GameWinMsgBoxFunc cancelFunc); ///< Display a Message box with Ok/Cancel buttons and track it
void GSMessageBoxYesNo(UnicodeString title, UnicodeString message, GameWinMsgBoxFunc yesFunc, GameWinMsgBoxFunc noFunc); ///< Display a Message box with Yes/No buttons and track it
void RaiseGSMessageBox( void ); ///< Bring GS message box to the foreground (if we transition screens while a message box is up)
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/IPEnumeration.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class EnumeratedIP : public MemoryPoolObject
{
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE(EnumeratedIP, "EnumeratedIP")
public:
EnumeratedIP() { m_IPstring = ""; m_next = NULL; m_IP = 0; }
EnumeratedIP() { m_IPstring = ""; m_next = nullptr; m_IP = 0; }

// Access functions
AsciiString getIPstring( void ) { return m_IPstring; }
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/LANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class LANAPI : public LANAPIInterface

Bool m_isInLANMenu; ///< true while we are in a LAN menu (lobby, game options, direct connect)
Bool m_inLobby; ///< Are we in the lobby (not in a game)?
LANGameInfo * m_currentGame; ///< Pointer to game (setup screen) we are currently in (NULL for lobby)
LANGameInfo * m_currentGame; ///< Pointer to game (setup screen) we are currently in (nullptr for lobby)
//LANGameInfo *m_currentGameInfo; ///< Pointer to game setup info we are currently in.

UnsignedInt m_localIP;
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/LANGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LANGameSlot : public GameSlot
public:
LANGameSlot();

LANPlayer *getUser( void ); ///< Get the User structure associated with the slot (NULL for non-humans)
LANPlayer *getUser( void ); ///< Get the User structure associated with the slot (nullptr for non-humans)

// Various tests
Bool isUser( LANPlayer *user ); ///< Does this slot contain the given user? Based off user->name
Expand Down
3 changes: 2 additions & 1 deletion Core/GameEngine/Include/GameNetwork/LANPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
// Author: Matthew D. Campbell, October 2001 (Pulled out of LANAPI.h by CLH on 12/21/01

#pragma once
#include <Utility/CppMacros.h>

/**
* LAN player class. This is for players sitting in the lobby. Players are
Expand All @@ -35,7 +36,7 @@
class LANPlayer
{
public:
LANPlayer() { m_name = m_login = m_host = L""; m_lastHeard = 0; m_next = NULL; m_IP = 0; }
LANPlayer() { m_name = m_login = m_host = L""; m_lastHeard = 0; m_next = nullptr; m_IP = 0; }

// Access functions
UnicodeString getName( void ) { return m_name; }
Expand Down
Loading
Loading