Skip to content

Commit 62d7a43

Browse files
committed
refactor: convert pointer assignments and comparisons from NULL to nullptr
1 parent 441ace4 commit 62d7a43

File tree

48 files changed

+77
-77
lines changed

Some content is hidden

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

48 files changed

+77
-77
lines changed

Core/GameEngine/Include/Common/AsciiString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class AsciiString
353353
token was found. (note that this modifies 'this' as well, stripping
354354
the token off!)
355355
*/
356-
Bool nextToken(AsciiString* token, const char* seps = NULL);
356+
Bool nextToken(AsciiString* token, const char* seps = nullptr);
357357

358358
/**
359359
return true iff the string is "NONE" (case-insensitive).

Core/GameEngine/Source/GameNetwork/NetCommandRef.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ NetCommandRef::~NetCommandRef()
6161
{
6262
m_msg->detach();
6363
}
64-
DEBUG_ASSERTCRASH(m_next == nullptr, ("NetCommandRef::~NetCommandRef - m_next != NULL"));
65-
DEBUG_ASSERTCRASH(m_prev == nullptr, ("NetCommandRef::~NetCommandRef - m_prev != NULL"));
64+
DEBUG_ASSERTCRASH(m_next == nullptr, ("NetCommandRef::~NetCommandRef - m_next != nullptr"));
65+
DEBUG_ASSERTCRASH(m_prev == nullptr, ("NetCommandRef::~NetCommandRef - m_prev != nullptr"));
6666

6767
#ifdef DEBUG_NETCOMMANDREF
6868
DEBUG_LOG(("NetCommandRef %d deleted", m_id));

Core/Libraries/Source/WWVegas/WWAudio/Utils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
//
4646
// Macros
4747
//
48-
#define SAFE_DELETE(pobject) { delete pobject; pobject = NULL; }
48+
#define SAFE_DELETE(pobject) { delete pobject; pobject = nullptr; }
4949

50-
#define SAFE_DELETE_ARRAY(pobject) { delete [] pobject; pobject = NULL; }
50+
#define SAFE_DELETE_ARRAY(pobject) { delete [] pobject; pobject = nullptr; }
5151

52-
#define SAFE_FREE(pobject) { ::free (pobject); pobject = NULL; }
52+
#define SAFE_FREE(pobject) { ::free (pobject); pobject = nullptr; }
5353

5454

5555
/////////////////////////////////////////////////////////////////////////////

Core/Tools/Autorun/autorun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ extern ArchiveFileSystem *TheArchiveFileSystem;
304304
#endif
305305

306306
// stuff needed to compile.
307-
HWND ApplicationHWnd = NULL;
307+
HWND ApplicationHWnd = nullptr;
308308
HINSTANCE ApplicationHInstance; ///< main application instance
309309

310310
const char *g_strFile = "Autorun.str";

Core/Tools/Launcher/monod.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ MonoD::~MonoD()
3838
{
3939
#ifdef _WIN32
4040
CloseHandle(handle);
41-
handle=NULL;
41+
handle = nullptr;
4242
#endif
4343
}
4444

Core/Tools/PATCHGET/CHATAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ inline const char* skipNonSeps(const char* p, const char* seps)
293293
}
294294

295295
//-----------------------------------------------------------------------------
296-
bool nextToken(std::string& base, std::string& tok, const char* seps = NULL)
296+
bool nextToken(std::string& base, std::string& tok, const char* seps = nullptr)
297297
{
298298
if (base.empty())
299299
return false;

Core/Tools/PATCHGET/WINBLOWS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// adding "patchget" namespaces and these globals here.
3333
// just to satisfy the game libraries we link to
3434
HINSTANCE ApplicationHInstance = nullptr; ///< our application instance
35-
HWND ApplicationHWnd = NULL;
35+
HWND ApplicationHWnd = nullptr;
3636
const char *g_strFile = "data\\Generals.str";
3737
const char *g_csfFile = "data\\%s\\Generals.csf";
3838
const char *gAppPrefix = "patchget_"; // prefix to the debug log.

Core/Tools/W3DView/Utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class RenderObjClass;
3636
//
3737
// Macros
3838
//
39-
#define SAFE_DELETE(pobject) { delete pobject; pobject = NULL; }
40-
#define SAFE_DELETE_ARRAY(pobject) { delete [] pobject; pobject = NULL; }
39+
#define SAFE_DELETE(pobject) { delete pobject; pobject = nullptr; }
40+
#define SAFE_DELETE_ARRAY(pobject) { delete [] pobject; pobject = nullptr; }
4141

4242
#define COM_RELEASE(pobject) \
4343
if (pobject) { \

Core/Tools/WW3D/max2w3d/ExportAllDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ExportAllDlg::ExportAllDlg (Interface *max_interface)
5757
{
5858
m_Directory[0] = '\0';
5959
m_Recursive = TRUE;
60-
m_hWnd = NULL;
60+
m_hWnd = nullptr;
6161
assert(max_interface != nullptr);
6262
m_MaxInterface = max_interface;
6363
}

Core/Tools/WW3D/max2w3d/SceneSetupDlg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SceneSetupDlg::SceneSetupDlg(Interface *max_interface)
5959
m_LodOffset = -100.0f;
6060
m_DamageProc = 3;
6161
m_LodProc = 3;
62-
m_hWnd = NULL;
62+
m_hWnd = nullptr;
6363
m_MaxInterface = max_interface;
6464
assert(max_interface != nullptr);
6565
}

0 commit comments

Comments
 (0)