Skip to content

Commit b67a5b9

Browse files
committed
refactor: convert NULL to nullptr in GeneralsMD Tools files
1 parent 2b8a9c3 commit b67a5b9

28 files changed

+44
-44
lines changed

GeneralsMD/Code/Tools/GUIEdit/Include/GUIEditWindowManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class GUIEditWindowManager : public W3DGameWindowManager
9090
also in the select list */
9191
void removeSupervisedChildSelections( void );
9292
/** selected windows that are children will cut loose their parents
93-
and become adults (their parent will be NULL, otherwise the screen) */
93+
and become adults (their parent will be nullptr, otherwise the screen) */
9494
// void orphanSelectedChildren( void );
9595

9696
/// dupe a window and its children

GeneralsMD/Code/Tools/GUIEdit/Source/Dialog Procedures/CallbackEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ BOOL CALLBACK CallbackEditorDialogProc( HWND hWndDialog, UINT message,
337337

338338

339339
// sanity
340-
DEBUG_ASSERTCRASH( win, ("NULL window set in listbox item data") );
340+
DEBUG_ASSERTCRASH( win, ("nullptr window set in listbox item data") );
341341

342342
// save the callbacks for the curent window selected
343343
SaveCallbacks( currentWindow, hWndDialog );

GeneralsMD/Code/Tools/GUIEdit/Source/Dialog Procedures/ColorDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ BOOL CALLBACK SelectColorDlgProc( HWND hWnd, UINT uMsg,
257257
*
258258
* Returns:
259259
* Pointer to selected color
260-
* NULL for canceled request
260+
* nullptr for canceled request
261261
*/
262262
// ============================================================================
263263
RGBColorInt *SelectColor( Int red, Int green, Int blue, Int alpha,

GeneralsMD/Code/Tools/GUIEdit/Source/EditWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ void EditWindow::registerEditWindowClass( void )
324324
wcex.cbWndExtra = 0;
325325
wcex.hInstance = hInst;
326326
wcex.hIcon = LoadIcon( hInst, (LPCTSTR)IDI_GUIEDIT );
327-
wcex.hCursor = nullptr; //LoadCursor(NULL, IDC_ARROW);
327+
wcex.hCursor = nullptr; //LoadCursor(nullptr, IDC_ARROW);
328328
wcex.hbrBackground = (HBRUSH)GetStockObject( BLACK_BRUSH );
329329
wcex.lpszMenuName = nullptr;
330330
wcex.lpszClassName = m_className;
@@ -1429,7 +1429,7 @@ void EditWindow::drawGrid( void )
14291429
{
14301430

14311431
TheDisplay->drawLine( 0, y, m_size.x, y, 1, color );
1432-
// MoveToEx( hdc, 0, y, NULL );
1432+
// MoveToEx( hdc, 0, y, nullptr );
14331433
// LineTo( hdc, m_size.x, y );
14341434

14351435
}
@@ -1438,7 +1438,7 @@ void EditWindow::drawGrid( void )
14381438
{
14391439

14401440
TheDisplay->drawLine( x, 0, x, m_size.y, 1, color );
1441-
// MoveToEx( hdc, x, 0, NULL );
1441+
// MoveToEx( hdc, x, 0, nullptr );
14421442
// LineTo( hdc, x, m_size.y );
14431443

14441444
}

GeneralsMD/Code/Tools/GUIEdit/Source/GUIEdit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ GUIEdit::~GUIEdit( void )
453453

454454
// delete the IME Manager
455455
// delete TheIMEManager;
456-
// TheIMEManager = NULL;
456+
// TheIMEManager = nullptr;
457457

458458
// all the shutdown routine
459459
shutdown();

GeneralsMD/Code/Tools/GUIEdit/Source/GUIEditWindowManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Int GUIEditWindowManager::winDestroy( GameWindow *window )
271271
// delete it
272272
delete editData;
273273

274-
// set the edit data to NULL in the window
274+
// set the edit data to nullptr in the window
275275
window->winSetEditData( nullptr );
276276

277277
}

GeneralsMD/Code/Tools/GUIEdit/Source/HierarchyView.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ void HierarchyView::addWindow( GameWindow *window, HierarchyOption option )
913913
if( findTreeEntry( window ) != nullptr )
914914
return;
915915

916-
// get the parent tree entry to this window, NULL if no parent
916+
// get the parent tree entry to this window, nullptr if no parent
917917
GameWindow *parent = window->winGetParent();
918918
HTREEITEM parentItem = findTreeEntry( parent );
919919

@@ -1108,7 +1108,7 @@ void HierarchyView::moveWindowAheadOf( GameWindow *window,
11081108
// get the window hierarchy entry
11091109
removeWindow( window );
11101110

1111-
// we'll say and aheadOf of NULL means put at the top
1111+
// we'll say and aheadOf of nullptr means put at the top
11121112
if( aheadOf == nullptr )
11131113
{
11141114

@@ -1130,13 +1130,13 @@ void HierarchyView::moveWindowAheadOf( GameWindow *window,
11301130

11311131
//
11321132
// get the parent item we will be inserting the new entry at, a parent
1133-
// of NULL is OK and will put it at the root of the tree
1133+
// of nullptr is OK and will put it at the root of the tree
11341134
//
11351135
HTREEITEM parentItem = TreeView_GetNextItem( m_tree, aheadOfItem, TVGN_PARENT );
11361136

11371137
//
11381138
// get the item that we will be inserting after (just previous to
1139-
// 'aheadOfItem' ... this can also be NULL for putting at the head
1139+
// 'aheadOfItem' ... this can also be nullptr for putting at the head
11401140
//
11411141
HTREEITEM prevItem = TreeView_GetNextItem( m_tree, aheadOfItem, TVGN_PREVIOUS );
11421142

@@ -1192,7 +1192,7 @@ void HierarchyView::moveWindowChildOf( GameWindow *window, GameWindow *parent )
11921192
// remvoe the window from the hierarchy
11931193
removeWindow( window );
11941194

1195-
// if parent is NULL we'll put at top of list
1195+
// if parent is nullptr we'll put at top of list
11961196
if( parent == nullptr )
11971197
{
11981198

@@ -1272,7 +1272,7 @@ void HierarchyView::selectWindow( GameWindow *window )
12721272
if( window )
12731273
item = findTreeEntry( window );
12741274

1275-
// select the item, or no item NULL will select nothing
1275+
// select the item, or no item nullptr will select nothing
12761276
TreeView_SelectItem( m_tree, item );
12771277
TreeView_Expand( m_tree, item, 0 );
12781278

GeneralsMD/Code/Tools/GUIEdit/Source/Properties.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static void saveTooltipDelayTextLabel(HWND dialog, HWND edit, GameWindow *window
661661
return;
662662
// WinInstanceData *instData = window->winGetInstanceData();
663663

664-
// instData->m_tooltipDelay = GetDlgItemInt( dialog, edit, NULL, TRUE );
664+
// instData->m_tooltipDelay = GetDlgItemInt( dialog, edit, nullptr, TRUE );
665665

666666
}
667667

@@ -1235,7 +1235,7 @@ void LoadHeaderTemplateListComboBox( HWND comboBox, AsciiString selected )
12351235
* image Loc from the GUI collection
12361236
*
12371237
* NOTE: The image list combo boxes have a [NONE] at index 0, if that
1238-
* is selected NULL will be returned
1238+
* is selected nullptr will be returned
12391239
*/
12401240
//=============================================================================
12411241
const Image *ComboBoxSelectionToImage( HWND comboBox )

GeneralsMD/Code/Tools/GUIEdit/Source/WinMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Int APIENTRY WinMain(HINSTANCE hInstance,
221221
TheFramePacer = new FramePacer();
222222

223223
//
224-
// see if we have any messages to process, a NULL window handle tells the
224+
// see if we have any messages to process, a nullptr window handle tells the
225225
// OS to look at the main window associated with the calling thread, us!
226226
//
227227
while( quit == FALSE )

GeneralsMD/Code/Tools/WorldBuilder/include/WHeightMapEdit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class WorldHeightMapEdit : public WorldHeightMap
157157
void changeBoundary(Int ndx, ICoord2D *border);
158158
void removeLastBoundary(void);
159159

160-
// outNdx must not be NULL, but outHandle can be.
160+
// outNdx must not be nullptr, but outHandle can be.
161161
// outHandle: 0 means BL, 1 means TL, 2 means TR, 3 means BR
162162
void findBoundaryNear(Coord3D *pt, float okDistance, Int *outNdx, Int *outHandle);
163163
};

0 commit comments

Comments
 (0)