Skip to content

Commit 92878b7

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

File tree

144 files changed

+1394
-1394
lines changed

Some content is hidden

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

144 files changed

+1394
-1394
lines changed

Core/GameEngine/Include/Common/AsciiString.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ class AsciiString
9191
unsigned short m_numCharsAllocated; // length of data allocated
9292
// char m_stringdata[];
9393

94-
char* peek() { return (char*)(this+1); }
94+
inline char* peek() { return (char*)(this+1); }
9595
};
9696

9797
#ifdef RTS_DEBUG
9898
void validate() const;
9999
#else
100-
void validate() const { }
100+
inline void validate() const { }
101101
#endif
102102

103103
protected:
@@ -325,13 +325,13 @@ class AsciiString
325325
return true iff self starts with the given string.
326326
*/
327327
Bool startsWith(const char* p) const;
328-
Bool startsWith(const AsciiString& stringSrc) const { return startsWith(stringSrc.str()); }
328+
inline Bool startsWith(const AsciiString& stringSrc) const { return startsWith(stringSrc.str()); }
329329

330330
/**
331331
return true iff self starts with the given string. (case insensitive)
332332
*/
333333
Bool startsWithNoCase(const char* p) const;
334-
Bool startsWithNoCase(const AsciiString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
334+
inline Bool startsWithNoCase(const AsciiString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
335335

336336
/**
337337
return true iff self ends with the given string.

Core/GameEngine/Include/Common/GameMemory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ class MemoryPoolObject
743743
virtual ~MemoryPoolObject() { }
744744

745745
protected:
746-
void *operator new(size_t s) { DEBUG_CRASH(("This should be impossible")); return 0; }
747-
void operator delete(void *p) { DEBUG_CRASH(("This should be impossible")); }
746+
inline void *operator new(size_t s) { DEBUG_CRASH(("This should be impossible")); return 0; }
747+
inline void operator delete(void *p) { DEBUG_CRASH(("This should be impossible")); }
748748

749749
protected:
750750

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
@@ -91,13 +91,13 @@ class UnicodeString
9191
unsigned short m_numCharsAllocated; // length of data allocated
9292
// WideChar m_stringdata[];
9393

94-
WideChar* peek() { return (WideChar*)(this+1); }
94+
inline WideChar* peek() { return (WideChar*)(this+1); }
9595
};
9696

9797
#ifdef RTS_DEBUG
9898
void validate() const;
9999
#else
100-
void validate() const { }
100+
inline void validate() const { }
101101
#endif
102102

103103
protected:
@@ -310,13 +310,13 @@ class UnicodeString
310310
return true iff self starts with the given string.
311311
*/
312312
Bool startsWith(const WideChar* p) const;
313-
Bool startsWith(const UnicodeString& stringSrc) const { return startsWith(stringSrc.str()); }
313+
inline Bool startsWith(const UnicodeString& stringSrc) const { return startsWith(stringSrc.str()); }
314314

315315
/**
316316
return true iff self starts with the given string. (case insensitive)
317317
*/
318318
Bool startsWithNoCase(const WideChar* p) const;
319-
Bool startsWithNoCase(const UnicodeString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
319+
inline Bool startsWithNoCase(const UnicodeString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
320320

321321
/**
322322
return true iff self ends with the given string.

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;

Core/GameEngine/Include/GameNetwork/LANAPI.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ class LANAPI : public LANAPIInterface
202202
virtual Bool SetLocalIP( UnsignedInt localIP ); ///< For multiple NIC machines
203203
virtual void SetLocalIP( AsciiString localIP ); ///< For multiple NIC machines
204204
virtual Bool AmIHost( void ); ///< Am I hosting a game?
205-
virtual inline UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
206-
virtual inline LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
207-
virtual inline UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
205+
virtual UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
206+
virtual LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
207+
virtual UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
208208
virtual void fillInLANMessage( LANMessage *msg ); ///< Fill in default params
209209
virtual void checkMOTD( void );
210210
protected:

0 commit comments

Comments
 (0)