Skip to content

Commit 64ebc0b

Browse files
committed
refactor: update NULL to nullptr in commented-out code for consistency
1 parent 42ca770 commit 64ebc0b

File tree

22 files changed

+35
-35
lines changed

22 files changed

+35
-35
lines changed

Core/Libraries/Source/WWVegas/WWLib/Except.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ void Load_Image_Helper(void)
11061106
if (symload) {
11071107
SymbolsAvailable = true;
11081108
} else {
1109-
//assert (_SymLoadModule != NULL);
1109+
//assert (_SymLoadModule != nullptr);
11101110
//DebugString ("SymLoad failed for module %s with code %d - %s\n", szModuleName, GetLastError(), Last_Error_Text());
11111111
}
11121112
}

Core/Libraries/Source/WWVegas/WWLib/ini.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ int INIClass::Get_String(char const * section, char const * entry, char const *
17011701
/*
17021702
** Verify that the parameters are nominally legal.
17031703
*/
1704-
// if (buffer != NULL && size > 0) {
1704+
// if (buffer != nullptr && size > 0) {
17051705
// buffer[0] = '\0';
17061706
// }
17071707
if (buffer == nullptr || size < 2 || section == nullptr || entry == nullptr) return(0);

Core/Tools/Autorun/Utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
// Purpose: To replace each "&" with "&&" for display in a dialog.
9191
// Some dialogs mistake a single "&" for an accelerator key.
9292
//
93-
// Input: pszString - any NULL terminated string.
93+
// Input: pszString - any null-terminated string.
9494
//
9595
// Returns: VOID (returns nothing)
9696
//
@@ -193,7 +193,7 @@ void Fix_Single_Ampersands ( wchar_t *pszString, bool upper_case )
193193
// Purpose: To replace each "&&" with "&" for display in a dialog.
194194
// Some dialogs mistake a single "&" for an accelerator key.
195195
//
196-
// Input: pszString - any NULL terminated string.
196+
// Input: pszString - any null-terminated string.
197197
//
198198
// Returns: VOID (returns nothing)
199199
//

Core/Tools/Launcher/Toolkit/Support/UString.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ UString::UString(UInt capacity)
186186
* Create a new UString from an ANSI string literal
187187
*
188188
* INPUTS
189-
* String - Pointer to a NULL terminated ANSI string
189+
* String - Pointer to a null-terminated ANSI string
190190
*
191191
* RESULT
192192
* NONE
@@ -210,7 +210,7 @@ UString::UString(const Char* s)
210210
* Create a new UString from a UNICODE string literal
211211
*
212212
* INPUTS
213-
* String - Pointer to a NULL terminated UNICODE string
213+
* String - Pointer to a null-terminated UNICODE string
214214
*
215215
* RESULT
216216
* NONE

Core/Tools/Launcher/wstring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ char Wstring::set(uint32 size, const char *string)
494494
return(FALSE);
495495
}
496496

497-
// Copy the bytes in the string, and NULL-terminate it.
497+
// Copy the bytes in the string, and null-terminate it.
498498
strncpy(str, string, size);
499499
str[size] = 0;
500500

Core/Tools/WW3D/max2w3d/meshsave.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ uint32 setup_mesh_attributes(INode * node)
155155
** And, a mesh may have one or more types of collision detection enabled.
156156
** W3D_MESH_FLAG_COLLISION_TYPE_PHYSICAL
157157
** W3D_MESH_FLAG_COLLISION_TYPE_PROJECTILE
158-
** However, if the mesh is SKIN, SHADOW, ALIGNED, ORIENTED or NULL, don't let
158+
** However, if the mesh is SKIN, SHADOW, ALIGNED, ORIENTED or nullptr, don't let
159159
** the collision bits get set...
160160
*/
161161
if ( attributes != W3D_MESH_FLAG_GEOMETRY_TYPE_SKIN &&
@@ -1069,7 +1069,7 @@ int MeshSaveClass::write_user_text(ChunkSaveClass & csave)
10691069
return 1;
10701070
}
10711071

1072-
// write the user text buffer (writing one extra byte to include the NULL)
1072+
// write the user text buffer (writing one extra byte to include the null terminator)
10731073
if (csave.Write(UserText,strlen(UserText) + 1) != strlen(UserText) + 1) {
10741074
return 1;
10751075
}

Core/Tools/WW3D/max2w3d/w3dutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,7 @@ void SettingsFormClass::Init(void)
15251525
SendMessage(dazzle_combo,CB_RESETCONTENT,0,0);
15261526

15271527
// Load the section of Dazzle.INI that defines all of the types. The windows function
1528-
// that I'm using here, reads in a NULL-terminated string for each entry in the section. Each
1528+
// that I'm using here, reads in a null-terminated string for each entry in the section. Each
15291529
// string is of the form 'key=value'. Based on my testing, it appears that windows removes any white
15301530
// space before or after the equal sign as well.
15311531
char dllpath[_MAX_PATH];

Core/Tools/WW3D/pluglib/rawfile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class RawFileClass : public FileClass
146146
#endif
147147

148148
/*
149-
** This points to the filename as a NULL terminated string. It may point to either a
149+
** This points to the filename as a null-terminated string. It may point to either a
150150
** constant or an allocated string as indicated by the "Allocated" flag.
151151
*/
152152
char const * Filename;

Generals/Code/GameEngine/Source/Common/GameEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ GameEngine::~GameEngine()
267267
TheMapCache = nullptr;
268268

269269
// delete TheShell;
270-
// TheShell = NULL;
270+
// TheShell = nullptr;
271271

272272
TheGameResultsQueue->endThreads();
273273

Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3228,7 +3228,7 @@ DX8Wrapper::Set_Render_Target(IDirect3DSurface8 *render_target, bool use_default
32283228
//
32293229
if (DefaultDepthBuffer == nullptr)
32303230
{
3231-
// IDirect3DSurface8 *depth_buffer = NULL;
3231+
// IDirect3DSurface8 *depth_buffer = nullptr;
32323232
DX8CALL(GetDepthStencilSurface (&DefaultDepthBuffer));
32333233
}
32343234

@@ -3356,7 +3356,7 @@ void DX8Wrapper::Set_Render_Target
33563356
//
33573357
if (DefaultDepthBuffer == nullptr)
33583358
{
3359-
// IDirect3DSurface8 *depth_buffer = NULL;
3359+
// IDirect3DSurface8 *depth_buffer = nullptr;
33603360
DX8CALL(GetDepthStencilSurface (&DefaultDepthBuffer));
33613361
}
33623362

@@ -3629,7 +3629,7 @@ void DX8Wrapper::Apply_Default_State()
36293629
Set_Texture(i,nullptr);
36303630
}
36313631

3632-
// DX8Wrapper::Set_Material(NULL);
3632+
// DX8Wrapper::Set_Material(nullptr);
36333633
VertexMaterialClass::Apply_Null();
36343634

36353635
for (unsigned index=0;index<4;++index) {

0 commit comments

Comments
 (0)