Skip to content

Commit 0629427

Browse files
committed
build: apply redundant inline removal across entire codebase
1 parent 4974675 commit 0629427

File tree

163 files changed

+1506
-1495
lines changed

Some content is hidden

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

163 files changed

+1506
-1495
lines changed

Core/GameEngine/Include/Common/AsciiString.h

Lines changed: 5 additions & 5 deletions
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).
@@ -390,7 +390,7 @@ inline char* AsciiString::peek() const
390390
}
391391

392392
// -----------------------------------------------------
393-
inline AsciiString::AsciiString() : m_data(0)
393+
inline AsciiString::AsciiString() : m_data(nullptr)
394394
{
395395
validate();
396396
}
@@ -420,7 +420,7 @@ inline int AsciiString::getByteCount() const
420420
inline Bool AsciiString::isEmpty() const
421421
{
422422
validate();
423-
return m_data == NULL || peek()[0] == 0;
423+
return m_data == nullptr || peek()[0] == 0;
424424
}
425425

426426
// -----------------------------------------------------
@@ -501,14 +501,14 @@ inline int AsciiString::compare(const char* s) const
501501
inline int AsciiString::compareNoCase(const AsciiString& stringSrc) const
502502
{
503503
validate();
504-
return _stricmp(this->str(), stringSrc.str());
504+
return strcmp(this->str(), stringSrc.str());
505505
}
506506

507507
// -----------------------------------------------------
508508
inline int AsciiString::compareNoCase(const char* s) const
509509
{
510510
validate();
511-
return _stricmp(this->str(), s);
511+
return strcmp(this->str(), s);
512512
}
513513

514514
// -----------------------------------------------------

Core/GameEngine/Include/Common/GameAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class AudioManagerDummy : public AudioManager
395395
virtual AsciiString getMusicTrackName() const { return ""; }
396396
virtual void openDevice() {}
397397
virtual void closeDevice() {}
398-
virtual void* getDevice() { return NULL; }
398+
virtual void* getDevice() { return nullptr; }
399399
virtual void notifyOfAudioCompletion(UnsignedInt audioCompleted, UnsignedInt flags) {}
400400
virtual UnsignedInt getProviderCount(void) const { return 0; };
401401
virtual AsciiString getProviderName(UnsignedInt providerNum) const { return ""; }
@@ -416,7 +416,7 @@ class AudioManagerDummy : public AudioManager
416416
virtual void removePlayingAudio(AsciiString eventName) {}
417417
virtual void removeAllDisabledAudio() {}
418418
virtual Bool has3DSensitiveStreamsPlaying(void) const { return false; }
419-
virtual void* getHandleForBink(void) { return NULL; }
419+
virtual void* getHandleForBink(void) { return nullptr; }
420420
virtual void releaseHandleForBink(void) {}
421421
virtual void friend_forcePlayAudioEventRTS(const AudioEventRTS* eventToPlay) {}
422422
virtual void setPreferredProvider(AsciiString providerNdx) {}

Core/GameEngine/Include/Common/GameMemory.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class MemoryPoolFactory
545545
/// destroy the contents of all pools and dmas. (the pools and dma's are not destroyed, just reset)
546546
void reset();
547547

548-
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = NULL );
548+
void memoryPoolUsageReport( const char* filename, FILE *appendToFileInstead = nullptr );
549549

550550
#ifdef MEMORYPOOL_DEBUG
551551

@@ -743,7 +743,11 @@ class MemoryPoolObject
743743
virtual ~MemoryPoolObject() { }
744744

745745
protected:
746+
<<<<<<< Updated upstream
746747
void *operator new(size_t s) { DEBUG_CRASH(("This should be impossible")); return 0; }
748+
=======
749+
void *operator new(size_t s) { DEBUG_CRASH(("This should be impossible")); return nullptr; }
750+
>>>>>>> Stashed changes
747751
void operator delete(void *p) { DEBUG_CRASH(("This should be impossible")); }
748752

749753
protected:
@@ -902,9 +906,9 @@ class MemoryPoolObjectHolder
902906
private:
903907
MemoryPoolObject *m_mpo;
904908
public:
905-
MemoryPoolObjectHolder(MemoryPoolObject *mpo = NULL) : m_mpo(mpo) { }
909+
MemoryPoolObjectHolder(MemoryPoolObject *mpo = nullptr) : m_mpo(mpo) { }
906910
void hold(MemoryPoolObject *mpo) { DEBUG_ASSERTCRASH(!m_mpo, ("already holding")); m_mpo = mpo; }
907-
void release() { m_mpo = NULL; }
911+
void release() { m_mpo = nullptr; }
908912
~MemoryPoolObjectHolder() { deleteInstance(m_mpo); }
909913
};
910914

Core/GameEngine/Include/Common/Radar.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ class RadarObject : public MemoryPoolObject,
9595

9696
// color management
9797
void setColor( Color c ) { m_color = c; }
98-
inline Color getColor( void ) const { return m_color; }
98+
Color getColor( void ) const { return m_color; }
9999

100-
inline void friend_setObject( Object *obj ) { m_object = obj; }
101-
inline Object *friend_getObject( void ) { return m_object; }
102-
inline const Object *friend_getObject( void ) const { return m_object; }
100+
void friend_setObject( Object *obj ) { m_object = obj; }
101+
Object *friend_getObject( void ) { return m_object; }
102+
const Object *friend_getObject( void ) const { return m_object; }
103103

104-
inline void friend_setNext( RadarObject *next ) { m_next = next; }
105-
inline RadarObject *friend_getNext( void ) { return m_next; }
106-
inline const RadarObject *friend_getNext( void ) const { return m_next; }
104+
void friend_setNext( RadarObject *next ) { m_next = next; }
105+
RadarObject *friend_getNext( void ) { return m_next; }
106+
const RadarObject *friend_getNext( void ) const { return m_next; }
107107

108108
Bool isTemporarilyHidden() const;
109109
static Bool isTemporarilyHidden(const Object* obj);
@@ -236,8 +236,8 @@ class Radar : public Snapshot,
236236
void deleteListResources( void ); ///< delete list radar resources used
237237
Bool deleteFromList( Object *obj, RadarObject **list ); ///< try to remove object from specific list
238238

239-
inline Real getTerrainAverageZ() const { return m_terrainAverageZ; }
240-
inline Real getWaterAverageZ() const { return m_waterAverageZ; }
239+
Real getTerrainAverageZ() const { return m_terrainAverageZ; }
240+
Real getWaterAverageZ() const { return m_waterAverageZ; }
241241

242242
void clearAllEvents( void ); ///< remove all radar events in progress
243243

Core/GameEngine/Include/Common/UnicodeString.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ inline WideChar* UnicodeString::peek() const
364364
}
365365

366366
// -----------------------------------------------------
367-
inline UnicodeString::UnicodeString() : m_data(0)
367+
inline UnicodeString::UnicodeString() : m_data(nullptr)
368368
{
369369
validate();
370370
}
@@ -394,7 +394,7 @@ inline int UnicodeString::getByteCount() const
394394
inline Bool UnicodeString::isEmpty() const
395395
{
396396
validate();
397-
return m_data == NULL || peek()[0] == 0;
397+
return m_data == nullptr || peek()[0] == 0;
398398
}
399399

400400
// -----------------------------------------------------
@@ -475,14 +475,14 @@ inline int UnicodeString::compare(const WideChar* s) const
475475
inline int UnicodeString::compareNoCase(const UnicodeString& stringSrc) const
476476
{
477477
validate();
478-
return _wcsicmp(this->str(), stringSrc.str());
478+
return strcasecmp(this->str(), stringSrc.str());
479479
}
480480

481481
// -----------------------------------------------------
482482
inline int UnicodeString::compareNoCase(const WideChar* s) const
483483
{
484484
validate();
485-
return _wcsicmp(this->str(), s);
485+
return strcasecmp(this->str(), s);
486486
}
487487

488488
// -----------------------------------------------------

Core/GameEngine/Include/GameClient/Smudge.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ class SmudgeManager
7878

7979
SmudgeSet *addSmudgeSet(void);
8080
void removeSmudgeSet(SmudgeSet &mySmudge);
81-
inline Int getSmudgeCountLastFrame(void) {return m_smudgeCountLastFrame;} ///<return number of smudges submitted last frame.
82-
inline void setSmudgeCountLastFrame(Int count) { m_smudgeCountLastFrame = count;}
83-
inline Bool getHardwareSupport(void) { return m_hardwareSupportStatus != SMUDGE_SUPPORT_NO;}
81+
Int getSmudgeCountLastFrame(void) {return m_smudgeCountLastFrame;} ///<return number of smudges submitted last frame.
82+
void setSmudgeCountLastFrame(Int count) { m_smudgeCountLastFrame = count;}
83+
Bool getHardwareSupport(void) { return m_hardwareSupportStatus != SMUDGE_SUPPORT_NO;}
8484

8585
protected:
8686

Core/GameEngine/Include/GameNetwork/FirewallHelper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,28 +211,28 @@ class FirewallHelperClass {
211211
/*
212212
** Behavior query functions.
213213
*/
214-
inline Bool isNAT(void) {
214+
Bool isNAT(void) {
215215
if (m_behavior == FIREWALL_TYPE_UNKNOWN || (m_behavior & FIREWALL_TYPE_SIMPLE) != 0) {
216216
return(FALSE);
217217
}
218218
return(TRUE);
219219
};
220220

221-
inline Bool isNAT(FirewallBehaviorType behavior) {
221+
Bool isNAT(FirewallBehaviorType behavior) {
222222
if (behavior == FIREWALL_TYPE_UNKNOWN || (behavior & FIREWALL_TYPE_SIMPLE) != 0) {
223223
return(FALSE);
224224
}
225225
return(TRUE);
226226
};
227227

228-
inline Bool isNetgear(FirewallBehaviorType behavior) {
228+
Bool isNetgear(FirewallBehaviorType behavior) {
229229
if ((behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
230230
return(TRUE);
231231
}
232232
return(FALSE);
233233
};
234234

235-
inline Bool isNetgear(void) {
235+
Bool isNetgear(void) {
236236
if ((m_behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
237237
return(TRUE);
238238
}

Core/GameEngine/Include/GameNetwork/GameInfo.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,22 @@ class GameSlot
8888
void setTeamNumber( Int teamNumber ) { m_teamNumber = teamNumber; }
8989
Int getTeamNumber( void ) const { return m_teamNumber; }
9090

91-
inline void setName( UnicodeString name ) { m_name = name; }
92-
inline UnicodeString getName( void ) const { return m_name; }
91+
void setName( UnicodeString name ) { m_name = name; }
92+
UnicodeString getName( void ) const { return m_name; }
9393

94-
inline void setIP( UnsignedInt IP ) { m_IP = IP; }
95-
inline UnsignedInt getIP( void ) const { return m_IP; }
94+
void setIP( UnsignedInt IP ) { m_IP = IP; }
95+
UnsignedInt getIP( void ) const { return m_IP; }
9696

97-
inline void setPort( UnsignedShort port ) { m_port = port; }
98-
inline UnsignedShort getPort( void ) const { return m_port; }
97+
void setPort( UnsignedShort port ) { m_port = port; }
98+
UnsignedShort getPort( void ) const { return m_port; }
9999

100-
inline void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
101-
inline FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }
100+
void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
101+
FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }
102102

103103
void saveOffOriginalInfo( void );
104-
inline Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
105-
inline Int getOriginalColor( void ) const { return m_origColor; }
106-
inline Int getOriginalStartPos( void ) const { return m_origStartPos; }
104+
Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
105+
Int getOriginalColor( void ) const { return m_origColor; }
106+
Int getOriginalStartPos( void ) const { return m_origStartPos; }
107107
Int getApparentPlayerTemplate( void ) const;
108108
Int getApparentColor( void ) const;
109109
Int getApparentStartPos( void ) const;
@@ -215,7 +215,7 @@ class GameInfo
215215

216216
// CRC checking hack
217217
void setCRCInterval( Int val ) { m_crcInterval = (val<100)?val:100; }
218-
inline Int getCRCInterval( void ) const { return m_crcInterval; }
218+
Int getCRCInterval( void ) const { return m_crcInterval; }
219219

220220
Bool haveWeSurrendered(void) { return m_surrendered; }
221221
void markAsSurrendered(void) { m_surrendered = TRUE; }

Core/GameEngine/Include/GameNetwork/GameSpy/StagingRoomGameInfo.h

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class GameSpyGameSlot : public GameSlot
5252
void setFavoriteSide( Int val ) { m_favoriteSide = val; }
5353

5454
void setPingString( AsciiString pingStr );
55-
inline AsciiString getPingString( void ) const { return m_pingStr; }
56-
inline Int getPingAsInt( void ) const { return m_pingInt; }
55+
AsciiString getPingString( void ) const { return m_pingStr; }
56+
Int getPingAsInt( void ) const { return m_pingInt; }
5757

5858
protected:
5959
Int m_profileID;
@@ -99,37 +99,37 @@ class GameSpyStagingRoom : public GameInfo
9999
virtual void reset( void );
100100

101101
void cleanUpSlotPointers(void);
102-
inline void setID(Int id) { m_id = id; }
103-
inline Int getID( void ) const { return m_id; }
104-
105-
inline void setHasPassword(Bool val) { m_requiresPassword = val; }
106-
inline Bool getHasPassword(void) const { return m_requiresPassword; }
107-
inline void setAllowObservers(Bool val) { m_allowObservers = val; }
108-
inline Bool getAllowObservers(void) const { return m_allowObservers; }
109-
110-
inline void setVersion(UnsignedInt val) { m_version = val; }
111-
inline UnsignedInt getVersion(void) const { return m_version; }
112-
inline void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
113-
inline UnsignedInt getExeCRC(void) const { return m_exeCRC; }
114-
inline void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
115-
inline UnsignedInt getIniCRC(void) const { return m_iniCRC; }
116-
117-
inline void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
118-
inline Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }
119-
120-
inline void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
121-
inline Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }
122-
123-
inline void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
124-
inline Int getReportedNumObservers(void) const { return m_reportedNumObservers; }
125-
126-
inline void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
127-
inline AsciiString getLadderIP( void ) const { return m_ladderIP; }
128-
inline void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
129-
inline UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
102+
void setID(Int id) { m_id = id; }
103+
Int getID( void ) const { return m_id; }
104+
105+
void setHasPassword(Bool val) { m_requiresPassword = val; }
106+
Bool getHasPassword(void) const { return m_requiresPassword; }
107+
void setAllowObservers(Bool val) { m_allowObservers = val; }
108+
Bool getAllowObservers(void) const { return m_allowObservers; }
109+
110+
void setVersion(UnsignedInt val) { m_version = val; }
111+
UnsignedInt getVersion(void) const { return m_version; }
112+
void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
113+
UnsignedInt getExeCRC(void) const { return m_exeCRC; }
114+
void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
115+
UnsignedInt getIniCRC(void) const { return m_iniCRC; }
116+
117+
void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
118+
Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }
119+
120+
void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
121+
Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }
122+
123+
void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
124+
Int getReportedNumObservers(void) const { return m_reportedNumObservers; }
125+
126+
void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
127+
AsciiString getLadderIP( void ) const { return m_ladderIP; }
128+
void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
129+
UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
130130
void setPingString( AsciiString pingStr );
131-
inline AsciiString getPingString( void ) const { return m_pingStr; }
132-
inline Int getPingAsInt( void ) const { return m_pingInt; }
131+
AsciiString getPingString( void ) const { return m_pingStr; }
132+
Int getPingAsInt( void ) const { return m_pingInt; }
133133

134134
virtual Bool amIHost( void ) const; ///< Convenience function - is the local player the game host?
135135

@@ -147,10 +147,10 @@ class GameSpyStagingRoom : public GameInfo
147147
void launchGame( void ); ///< NAT negotiation has finished - really start
148148
virtual Int getLocalSlotNum( void ) const; ///< Get the local slot number, or -1 if we're not present
149149

150-
inline void setGameName( UnicodeString name ) { m_gameName = name; }
151-
inline UnicodeString getGameName( void ) const { return m_gameName; }
150+
void setGameName( UnicodeString name ) { m_gameName = name; }
151+
UnicodeString getGameName( void ) const { return m_gameName; }
152152

153-
inline void setLocalName( AsciiString name ) { m_localName = name; }
153+
void setLocalName( AsciiString name ) { m_localName = name; }
154154
};
155155

156156
extern GameSpyStagingRoom *TheGameSpyGame;

Core/GameEngine/Include/GameNetwork/IPEnumeration.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ class EnumeratedIP : public MemoryPoolObject
4040
EnumeratedIP() { m_IPstring = ""; m_next = NULL; m_IP = 0; }
4141

4242
// Access functions
43-
inline AsciiString getIPstring( void ) { return m_IPstring; }
44-
inline void setIPstring( AsciiString name ) { m_IPstring = name; }
45-
inline UnsignedInt getIP( void ) { return m_IP; }
46-
inline void setIP( UnsignedInt IP ) { m_IP = IP; }
47-
inline EnumeratedIP *getNext( void ) { return m_next; }
48-
inline void setNext( EnumeratedIP *next ) { m_next = next; }
43+
AsciiString getIPstring( void ) { return m_IPstring; }
44+
void setIPstring( AsciiString name ) { m_IPstring = name; }
45+
UnsignedInt getIP( void ) { return m_IP; }
46+
void setIP( UnsignedInt IP ) { m_IP = IP; }
47+
EnumeratedIP *getNext( void ) { return m_next; }
48+
void setNext( EnumeratedIP *next ) { m_next = next; }
4949

5050
protected:
5151
AsciiString m_IPstring;

0 commit comments

Comments
 (0)