Skip to content

Commit 7d8e960

Browse files
committed
refactor: convert remaining NULL to nullptr in code
1 parent eba1e1b commit 7d8e960

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Core/Tools/Autorun/GETCD.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ int GetCDClass::Get_CD_Drive_For_This_Volume ( const char *volume_label )
213213
FORMAT_MESSAGE_ALLOCATE_BUFFER |
214214
FORMAT_MESSAGE_FROM_SYSTEM |
215215
FORMAT_MESSAGE_IGNORE_INSERTS,
216-
NULL,
216+
nullptr,
217217
GetLastError(),
218218
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
219219
(LPTSTR) &lpMsgBuf,
220220
0,
221-
NULL
221+
nullptr
222222
);
223223
Msg( __LINE__, __FILE__, (LPTSTR)lpMsgBuf );
224224
LocalFree( lpMsgBuf );
@@ -282,10 +282,10 @@ const char *GetCDClass::Get_Volume_For_This_CD_Drive ( const char *path, char *v
282282
(char const *)buffer,
283283
&volume_label[0],
284284
(unsigned long)sizeof(volume_label)-1,
285-
(unsigned long *)NULL,
285+
(unsigned long *)nullptr,
286286
(unsigned long *)&filename_length,
287287
(unsigned long *)&misc_dword,
288-
(char *)NULL,
288+
(char *)nullptr,
289289
(unsigned long)0 )) {
290290

291291
strcpy( volume_name, volume_label );

Core/Tools/Autorun/autorun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4809,7 +4809,7 @@ BOOL Valid_Environment ( void )
48094809
length = wideBuffer.length();
48104810
WideCharToMultiByte( CodePage, 0, wideBuffer.c_str(), length+1, szBuffer, _MAX_PATH, nullptr, nullptr );
48114811
length = wideBuffer2.length();
4812-
WideCharToMultiByte( CodePage, 0, wideBuffer2.c_str(), length+1, szBuffer2, _MAX_PATH, nullptr, NULL );
4812+
WideCharToMultiByte( CodePage, 0, wideBuffer2.c_str(), length+1, szBuffer2, _MAX_PATH, nullptr, nullptr );
48134813
MessageBox( nullptr, szBuffer, szBuffer2, MB_APPLMODAL | MB_OK );
48144814
}
48154815

Core/Tools/WW3D/max2w3d/floaterdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ bool FloaterDialogClass::Dialog_Proc(HWND hWnd,UINT message,WPARAM wParam,LPARAM
227227

228228
case WM_DESTROY:
229229
::GetCOREInterface()->UnRegisterDlgWnd(Hwnd);
230-
Hwnd = NULL;
230+
Hwnd = nullptr;
231231
break;
232232
}
233233
return 0;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@ stack_frame.AddrFrame.Offset = myebp;
356356
process,
357357
thread,
358358
&stack_frame,
359-
NULL, //&gsContext,
360-
NULL,
359+
nullptr, //&gsContext,
360+
nullptr,
361361
DbgHelpLoader::symFunctionTableAccess,
362362
DbgHelpLoader::symGetModuleBase,
363-
NULL) != 0;
363+
nullptr) != 0;
364364
skip--;
365365
}
366366

0 commit comments

Comments
 (0)