Skip to content

Commit 874b313

Browse files
committed
refactor: convert NULL to nullptr in Core Tools files
Update comments in Core Tools files (W3DView, Babylon, Launcher, Autorun, matchbot, mangler, MapCacheBuilder, ImagePacker, WW3D) to use nullptr terminology.
1 parent 312551d commit 874b313

File tree

22 files changed

+33
-33
lines changed

22 files changed

+33
-33
lines changed

GeneralsMD/Code/GameEngine/Include/Common/CriticalSection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ScopedCriticalSection
9494

9595
#include "mutex.h"
9696

97-
// These should be NULL on creation then non-NULL in WinMain or equivalent.
97+
// These should be nullptr on creation then non-nullptr in WinMain or equivalent.
9898
// This allows us to be silently non-threadsafe for WB and other single-threaded apps.
9999
extern CriticalSection *TheAsciiStringCriticalSection;
100100
extern CriticalSection *TheUnicodeStringCriticalSection;

GeneralsMD/Code/GameEngine/Include/Common/Overridable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Overridable : public MemoryPoolObject
4949
public:
5050
Overridable() : m_nextOverride(nullptr), m_isOverride(false) {}
5151

52-
// return a constant version of m_nextOverride, which can be NULL if there is no
52+
// return a constant version of m_nextOverride, which can be nullptr if there is no
5353
// override
5454
const Overridable *getNextOverride( void ) const
5555
{

GeneralsMD/Code/GameEngine/Include/Common/StackDump.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
#if defined(RTS_DEBUG) || defined(IG_DEBUG_STACKTRACE)
3131

3232
// Writes a stackdump (provide a callback : gets called per line)
33-
// If callback is NULL then will write using OuputDebugString
33+
// If callback is nullptr then will write using OuputDebugString
3434
void StackDump(void (*callback)(const char*));
3535

3636
// Writes a stackdump (provide a callback : gets called per line)
37-
// If callback is NULL then will write using OuputDebugString
37+
// If callback is nullptr then will write using OuputDebugString
3838
void StackDumpFromContext(DWORD eip,DWORD esp,DWORD ebp, void (*callback)(const char*));
3939

4040
// Gets count* addresses from the current stack

GeneralsMD/Code/GameEngine/Include/Common/SubsystemInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SubsystemInterface
5252
/** - Constructors should initialize any data to a valid state. That DOES NOT mean
5353
* the data has default values (something done in the init() method), only that
5454
* nothing is left pointing to garbage, un-initialized memory. In most cases
55-
* this probably means just setting members to zero or NULL.
55+
* this probably means just setting members to zero or nullptr.
5656
*/
5757
SubsystemInterface();
5858

GeneralsMD/Code/GameEngine/Include/Common/Team.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class Team : public MemoryPoolObject,
259259
Player *getControllingPlayer() const;
260260

261261
/**
262-
set the team's owner. (NULL is not allowed)
262+
set the team's owner. (nullptr is not allowed)
263263
*/
264264
void setControllingPlayer(Player *newController);
265265

@@ -540,7 +540,7 @@ class TeamPrototype : public MemoryPoolObject,
540540
Team *findTeamByID( TeamID teamID );
541541

542542
/**
543-
set the team's owner. (NULL is not allowed)
543+
set the team's owner. (nullptr is not allowed)
544544
*/
545545
void setControllingPlayer(Player *newController);
546546

GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class PickAndPlayInfo
117117

118118
Bool m_air; //Are we attacking an airborned target?
119119
Drawable *m_drawTarget; //Do we have an override draw target?
120-
WeaponSlotType *m_weaponSlot; //Are we forcing a specific weapon slot? NULL if unspecified.
120+
WeaponSlotType *m_weaponSlot; //Are we forcing a specific weapon slot? nullptr if unspecified.
121121
SpecialPowerType m_specialPowerType; //Which special power are use using? SPECIAL_INVALID if unspecified.
122122
};
123123

GeneralsMD/Code/GameEngine/Include/GameClient/GameWindowManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ friend class GameWindow;
270270
WindowMsgData mData1, WindowMsgData mData2 );
271271

272272
/** get the window pointer from id, starting at 'window' and searching
273-
down the heirarchy. If 'window' is NULL then all windows will
273+
down the heirarchy. If 'window' is nullptr then all windows will
274274
be searched */
275275
virtual GameWindow *winGetWindowFromId( GameWindow *window, Int id );
276276
virtual Int winCapture( GameWindow *window ); ///< captures the mouse

GeneralsMD/Code/GameEngine/Include/GameLogic/Module/CollideModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
//-------------------------------------------------------------------------------------------------
3636
/** OBJECT COLLIDE MODULE
3737
- Called when two objects collide (or when object collides with ground)
38-
- Note in the 'collide' method that 'other' can be NULL, this indicates a
38+
- Note in the 'collide' method that 'other' can be nullptr, this indicates a
3939
collision with the ground
4040
- Also note the 'collide' method is the response for the object that THIS module
4141
belongs to, we do not need to worry about the collision moudle of 'other',

GeneralsMD/Code/GameEngine/Include/GameLogic/Module/DamageModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class DamageModuleData : public BehaviorModuleData
7070

7171
static const FieldParse dataFieldParse[] =
7272
{
73-
// { "DamageTypes", INI::parseDamageTypeFlags, NULL, offsetof( DamageModuleData, m_damageTypes ) },
73+
// { "DamageTypes", INI::parseDamageTypeFlags, nullptr, offsetof( DamageModuleData, m_damageTypes ) },
7474
{ 0, 0, 0, 0 }
7575
};
7676

GeneralsMD/Code/GameEngine/Include/GameLogic/Module/EMPUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class EMPUpdateModuleData : public UpdateModuleData
8787
{ "StartFadeTime", INI::parseDurationUnsignedInt, nullptr, offsetof( EMPUpdateModuleData, m_startFadeFrame ) },
8888
{ "StartScale", INI::parseReal, nullptr, offsetof( EMPUpdateModuleData, m_startScale ) },
8989
{ "DisabledDuration", INI::parseDurationUnsignedInt, nullptr, offsetof( EMPUpdateModuleData, m_disabledDuration ) },
90-
//{ "SpinRateMax", INI::parseReal, NULL, offsetof( EMPUpdateModuleData, m_spinRateMax ) },
90+
//{ "SpinRateMax", INI::parseReal, nullptr, offsetof( EMPUpdateModuleData, m_spinRateMax ) },
9191
{ "TargetScaleMax", INI::parseReal, nullptr, offsetof( EMPUpdateModuleData, m_targetScaleMax ) },
9292
{ "TargetScaleMin", INI::parseReal, nullptr, offsetof( EMPUpdateModuleData, m_targetScaleMin ) },
9393
{ "StartColor", INI::parseRGBColor, nullptr, offsetof( EMPUpdateModuleData, m_startColor ) },

0 commit comments

Comments
 (0)