Skip to content

Commit 31bf9e7

Browse files
committed
use a script to convert remaining NULLs to nullptrs
1 parent f92b43a commit 31bf9e7

File tree

1,265 files changed

+6951
-6951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,265 files changed

+6951
-6951
lines changed

Core/GameEngine/Include/Common/ArchiveFileSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ class ArchiveFileSystem : public SubsystemInterface
156156
protected:
157157
struct ArchivedDirectoryInfoResult
158158
{
159-
ArchivedDirectoryInfoResult() : dirInfo(NULL) {}
160-
Bool valid() const { return dirInfo != NULL; }
159+
ArchivedDirectoryInfoResult() : dirInfo(nullptr) {}
160+
Bool valid() const { return dirInfo != nullptr; }
161161

162162
ArchivedDirectoryInfo* dirInfo;
163163
AsciiString lastToken; ///< Synonymous for file name if the search directory was a file path

Core/GameEngine/Include/Common/GameAudio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class AudioManager : public SubsystemInterface
134134
AudioManager();
135135
virtual ~AudioManager();
136136
#if defined(RTS_DEBUG)
137-
virtual void audioDebugDisplay(DebugDisplayInterface *dd, void *userData, FILE *fp = NULL ) = 0;
137+
virtual void audioDebugDisplay(DebugDisplayInterface *dd, void *userData, FILE *fp = nullptr ) = 0;
138138
#endif
139139

140140
// From SubsystemInterface

Core/GameEngine/Include/Common/GameMemory.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class MemoryPool
321321
void addToList(MemoryPool **pHead); ///< add this pool to head of the linked list
322322
void removeFromList(MemoryPool **pHead); ///< remove this pool from the linked list
323323
#ifdef MEMORYPOOL_DEBUG
324-
static void debugPoolInfoReport( MemoryPool *pool, FILE *fp = NULL ); ///< dump a report about this pool to the logfile
324+
static void debugPoolInfoReport( MemoryPool *pool, FILE *fp = nullptr ); ///< dump a report about this pool to the logfile
325325
const char *debugGetBlockTagString(void *pBlock); ///< return the tagstring for the given block (assumed to belong to this pool)
326326
void debugMemoryVerifyPool(); ///< perform internal consistency check on this pool.
327327
Int debugPoolReportLeaks( const char* owner );
@@ -421,7 +421,7 @@ class DynamicMemoryAllocator
421421
Int debugCalcRawBlockBytes(Int *numBlocks); ///< calculate the number of bytes in "raw" (non-subpool) blocks
422422
void debugMemoryVerifyDma(); ///< perform internal consistency check
423423
const char *debugGetBlockTagString(void *pBlock); ///< return the tagstring for the given block (assumed to belong to this dma)
424-
void debugDmaInfoReport( FILE *fp = NULL ); ///< dump a report about this pool to the logfile
424+
void debugDmaInfoReport( FILE *fp = nullptr ); ///< dump a report about this pool to the logfile
425425
Int debugDmaReportLeaks();
426426
#endif
427427
#ifdef MEMORYPOOL_CHECKPOINTING
@@ -545,7 +545,7 @@ class MemoryPoolFactory
545545
/// destroy the contents of all pools and dmas. (the pools and dma's are not destroyed, just reset)
546546
void reset();
547547

548-
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = NULL );
548+
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = nullptr );
549549

550550
#ifdef MEMORYPOOL_DEBUG
551551

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

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

564564
void debugSetInitFillerIndex(Int index);
565565

@@ -902,9 +902,9 @@ class MemoryPoolObjectHolder
902902
private:
903903
MemoryPoolObject *m_mpo;
904904
public:
905-
MemoryPoolObjectHolder(MemoryPoolObject *mpo = NULL) : m_mpo(mpo) { }
905+
MemoryPoolObjectHolder(MemoryPoolObject *mpo = nullptr) : m_mpo(mpo) { }
906906
void hold(MemoryPoolObject *mpo) { DEBUG_ASSERTCRASH(!m_mpo, ("already holding")); m_mpo = mpo; }
907-
void release() { m_mpo = NULL; }
907+
void release() { m_mpo = nullptr; }
908908
~MemoryPoolObjectHolder() { deleteInstance(m_mpo); }
909909
};
910910

Core/GameEngine/Include/Common/GameMemoryNull.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ class MemoryPoolFactory
6464
{
6565
public:
6666

67-
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = NULL );
67+
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = nullptr );
6868

6969
#ifdef MEMORYPOOL_DEBUG
7070

71-
void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = NULL );
71+
void debugMemoryReport(Int flags, Int startCheckpoint, Int endCheckpoint, FILE *fp = nullptr );
7272
void debugSetInitFillerIndex(Int index);
7373

7474
#endif

Core/GameEngine/Include/Common/LocalFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class LocalFile : public File
103103
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
104104
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
105105
virtual Bool flush(); ///< flush data to disk
106-
virtual void nextLine(Char *buf = NULL, Int bufSize = 0); ///< moves file position to after the next new-line
106+
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves file position to after the next new-line
107107
virtual Bool scanInt(Int &newInt); ///< return what gets read in as an integer at the current file position.
108108
virtual Bool scanReal(Real &newReal); ///< return what gets read in as a float at the current file position.
109109
virtual Bool scanString(AsciiString &newString); ///< return what gets read in as a string at the current file position.

Core/GameEngine/Include/Common/RAMFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class RAMFile : public File
9494
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
9595
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
9696
virtual Bool flush(); ///< flush data to disk
97-
virtual void nextLine(Char *buf = NULL, Int bufSize = 0); ///< moves current position to after the next new-line
97+
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves current position to after the next new-line
9898

9999
virtual Bool scanInt(Int &newInt); ///< return what gets read as an integer from the current memory position.
100100
virtual Bool scanReal(Real &newReal); ///< return what gets read as a float from the current memory position.

Core/GameEngine/Include/Common/Radar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class Radar : public Snapshot,
165165
virtual void update( void ); ///< subsystem per frame update
166166

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

170170
Bool radarToWorld( const ICoord2D *radar, Coord3D *world ); ///< radar point to world point on terrain
171171
Bool radarToWorld2D( const ICoord2D *radar, Coord3D *world ); ///< radar point to world point (x,y only!)

Core/GameEngine/Include/Common/StreamingArchiveFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class StreamingArchiveFile : public RAMFile
9090
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
9191

9292
// Ini's should not be parsed with streaming files, that's just dumb.
93-
virtual void nextLine(Char *buf = NULL, Int bufSize = 0) { DEBUG_CRASH(("Should not call nextLine on a streaming file.")); }
93+
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) { DEBUG_CRASH(("Should not call nextLine on a streaming file.")); }
9494
virtual Bool scanInt(Int &newInt) { DEBUG_CRASH(("Should not call scanInt on a streaming file.")); return FALSE; }
9595
virtual Bool scanReal(Real &newReal) { DEBUG_CRASH(("Should not call scanReal on a streaming file.")); return FALSE; }
9696
virtual Bool scanString(AsciiString &newString) { DEBUG_CRASH(("Should not call scanString on a streaming file.")); return FALSE; }

Core/GameEngine/Include/Common/file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class File : public MemoryPoolObject
183183
* END: means seek the specified number of bytes back from the end of the file
184184
*/
185185
virtual Bool flush() = 0; ///< flush data to disk
186-
virtual void nextLine(Char *buf = NULL, Int bufSize = 0) = 0; ///< reads until it reaches a new-line character
186+
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) = 0; ///< reads until it reaches a new-line character
187187

188188
virtual Bool scanInt(Int &newInt) = 0; ///< read an integer from the current file position.
189189
virtual Bool scanReal(Real &newReal) = 0; ///< read a real number from the current file position.

Core/GameEngine/Include/GameNetwork/GameSpyOverlay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "GameClient/GameWindowManager.h"
3737

3838
void ClearGSMessageBoxes( void ); ///< Tear down any GS message boxes (e.g. in case we have a new one to put up)
39-
void GSMessageBoxOk(UnicodeString titleString,UnicodeString bodyString, GameWinMsgBoxFunc okFunc = NULL); ///< Display a Message box with Ok button and track it
39+
void GSMessageBoxOk(UnicodeString titleString,UnicodeString bodyString, GameWinMsgBoxFunc okFunc = nullptr); ///< Display a Message box with Ok button and track it
4040
void GSMessageBoxOkCancel(UnicodeString title, UnicodeString message, GameWinMsgBoxFunc okFunc, GameWinMsgBoxFunc cancelFunc); ///< Display a Message box with Ok/Cancel buttons and track it
4141
void GSMessageBoxYesNo(UnicodeString title, UnicodeString message, GameWinMsgBoxFunc yesFunc, GameWinMsgBoxFunc noFunc); ///< Display a Message box with Yes/No buttons and track it
4242
void RaiseGSMessageBox( void ); ///< Bring GS message box to the foreground (if we transition screens while a message box is up)

0 commit comments

Comments
 (0)