Skip to content

Commit 4974675

Browse files
committed
build: remove redundant inline specifiers from implicitly inline functions
1 parent 94354fd commit 4974675

File tree

13 files changed

+79
-79
lines changed

13 files changed

+79
-79
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-
inline char* peek() { return (char*)(this+1); }
94+
char* peek() { return (char*)(this+1); }
9595
};
9696

9797
#ifdef RTS_DEBUG
9898
void validate() const;
9999
#else
100-
inline void validate() const { }
100+
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-
inline Bool startsWith(const AsciiString& stringSrc) const { return startsWith(stringSrc.str()); }
328+
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-
inline Bool startsWithNoCase(const AsciiString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
334+
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-
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")); }
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")); }
748748

749749
protected:
750750

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-
inline WideChar* peek() { return (WideChar*)(this+1); }
94+
WideChar* peek() { return (WideChar*)(this+1); }
9595
};
9696

9797
#ifdef RTS_DEBUG
9898
void validate() const;
9999
#else
100-
inline void validate() const { }
100+
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-
inline Bool startsWith(const UnicodeString& stringSrc) const { return startsWith(stringSrc.str()); }
313+
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-
inline Bool startsWithNoCase(const UnicodeString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
319+
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/ClientRandomValue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ class GameClientRandomVariable
7575
void setRange( Real low, Real high, DistributionType type = UNIFORM );
7676

7777
Real getValue( void ) const; ///< return a value from the random distribution
78-
inline Real getMinimumValue( void ) const { return m_low; }
79-
inline Real getMaximumValue( void ) const { return m_high; }
80-
inline DistributionType getDistributionType( void ) const { return m_type; }
78+
Real getMinimumValue( void ) const { return m_low; }
79+
Real getMaximumValue( void ) const { return m_high; }
80+
DistributionType getDistributionType( void ) const { return m_type; }
8181
protected:
8282
DistributionType m_type; ///< the kind of random distribution
8383
Real m_low, m_high; ///< the range of random values

Core/GameEngine/Include/GameLogic/LogicRandomValue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ class GameLogicRandomVariable
7575
void setRange( Real low, Real high, DistributionType type = UNIFORM );
7676

7777
Real getValue( void ) const; ///< return a value from the random distribution
78-
inline Real getMinimumValue( void ) const { return m_low; }
79-
inline Real getMaximumValue( void ) const { return m_high; }
80-
inline DistributionType getDistributionType( void ) const { return m_type; }
78+
Real getMinimumValue( void ) const { return m_low; }
79+
Real getMaximumValue( void ) const { return m_high; }
80+
DistributionType getDistributionType( void ) const { return m_type; }
8181
protected:
8282
DistributionType m_type; ///< the kind of random distribution
8383
Real m_low, m_high; ///< the range of random values

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,37 +63,37 @@ class BitFlags
6363
kInit = 0
6464
};
6565

66-
inline BitFlags()
66+
BitFlags()
6767
{
6868
}
6969

70-
inline BitFlags(BogusInitType k, Int idx1)
70+
BitFlags(BogusInitType k, Int idx1)
7171
{
7272
m_bits.set(idx1);
7373
}
7474

75-
inline BitFlags(BogusInitType k, Int idx1, Int idx2)
75+
BitFlags(BogusInitType k, Int idx1, Int idx2)
7676
{
7777
m_bits.set(idx1);
7878
m_bits.set(idx2);
7979
}
8080

81-
inline BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3)
81+
BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3)
8282
{
8383
m_bits.set(idx1);
8484
m_bits.set(idx2);
8585
m_bits.set(idx3);
8686
}
8787

88-
inline BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4)
88+
BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4)
8989
{
9090
m_bits.set(idx1);
9191
m_bits.set(idx2);
9292
m_bits.set(idx3);
9393
m_bits.set(idx4);
9494
}
9595

96-
inline BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4, Int idx5)
96+
BitFlags(BogusInitType k, Int idx1, Int idx2, Int idx3, Int idx4, Int idx5)
9797
{
9898
m_bits.set(idx1);
9999
m_bits.set(idx2);
@@ -102,7 +102,7 @@ class BitFlags
102102
m_bits.set(idx5);
103103
}
104104

105-
inline BitFlags(BogusInitType k,
105+
BitFlags(BogusInitType k,
106106
Int idx1,
107107
Int idx2,
108108
Int idx3,
@@ -131,36 +131,36 @@ class BitFlags
131131
m_bits.set(idx12);
132132
}
133133

134-
inline Bool operator==(const BitFlags& that) const
134+
Bool operator==(const BitFlags& that) const
135135
{
136136
return this->m_bits == that.m_bits;
137137
}
138138

139-
inline Bool operator!=(const BitFlags& that) const
139+
Bool operator!=(const BitFlags& that) const
140140
{
141141
return this->m_bits != that.m_bits;
142142
}
143143

144-
inline void set(Int i, Int val = 1)
144+
void set(Int i, Int val = 1)
145145
{
146146
m_bits.set(i, val);
147147
}
148148

149-
inline Bool test(Int i) const
149+
Bool test(Int i) const
150150
{
151151
return m_bits.test(i);
152152
}
153153

154154
//Tests for any bits that are set in both.
155-
inline Bool testForAny( const BitFlags& that ) const
155+
Bool testForAny( const BitFlags& that ) const
156156
{
157157
BitFlags tmp = *this;
158158
tmp.m_bits &= that.m_bits;
159159
return tmp.m_bits.any();
160160
}
161161

162162
//All argument bits must be set in our bits too in order to return TRUE
163-
inline Bool testForAll( const BitFlags& that ) const
163+
Bool testForAll( const BitFlags& that ) const
164164
{
165165
DEBUG_ASSERTCRASH( that.any(), ("BitFlags::testForAll is always true if you ask about zero flags. Did you mean that?") );
166166

@@ -171,78 +171,78 @@ class BitFlags
171171
}
172172

173173
//None of the argument bits must be set in our bits in order to return TRUE
174-
inline Bool testForNone( const BitFlags& that ) const
174+
Bool testForNone( const BitFlags& that ) const
175175
{
176176
BitFlags tmp = *this;
177177
tmp.m_bits &= that.m_bits;
178178
return !tmp.m_bits.any();
179179
}
180180

181-
inline Int size() const
181+
Int size() const
182182
{
183183
return m_bits.size();
184184
}
185185

186-
inline Int count() const
186+
Int count() const
187187
{
188188
return m_bits.count();
189189
}
190190

191-
inline Bool any() const
191+
Bool any() const
192192
{
193193
return m_bits.any();
194194
}
195195

196-
inline void flip()
196+
void flip()
197197
{
198198
m_bits.flip();
199199
}
200200

201-
inline void clear()
201+
void clear()
202202
{
203203
m_bits.reset();
204204
}
205205

206-
inline Int countIntersection(const BitFlags& that) const
206+
Int countIntersection(const BitFlags& that) const
207207
{
208208
BitFlags tmp = *this;
209209
tmp.m_bits &= that.m_bits;
210210
return tmp.m_bits.count();
211211
}
212212

213-
inline Int countInverseIntersection(const BitFlags& that) const
213+
Int countInverseIntersection(const BitFlags& that) const
214214
{
215215
BitFlags tmp = *this;
216216
tmp.m_bits.flip();
217217
tmp.m_bits &= that.m_bits;
218218
return tmp.m_bits.count();
219219
}
220220

221-
inline Bool anyIntersectionWith(const BitFlags& that) const
221+
Bool anyIntersectionWith(const BitFlags& that) const
222222
{
223223
/// @todo srj -- improve me.
224224
BitFlags tmp = that;
225225
tmp.m_bits &= m_bits;
226226
return tmp.m_bits.any();
227227
}
228228

229-
inline void clear(const BitFlags& clr)
229+
void clear(const BitFlags& clr)
230230
{
231231
m_bits &= ~clr.m_bits;
232232
}
233233

234-
inline void set(const BitFlags& set)
234+
void set(const BitFlags& set)
235235
{
236236
m_bits |= set.m_bits;
237237
}
238238

239-
inline void clearAndSet(const BitFlags& clr, const BitFlags& set)
239+
void clearAndSet(const BitFlags& clr, const BitFlags& set)
240240
{
241241
m_bits &= ~clr.m_bits;
242242
m_bits |= set.m_bits;
243243
}
244244

245-
inline Bool testSetAndClear(const BitFlags& mustBeSet, const BitFlags& mustBeClear) const
245+
Bool testSetAndClear(const BitFlags& mustBeSet, const BitFlags& mustBeClear) const
246246
{
247247
/// @todo srj -- improve me.
248248
BitFlags tmp = *this;

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct FieldParse
116116
const void* userData; ///< field-specific data
117117
Int offset; ///< offset to data field
118118

119-
inline void set(const char* t, INIFieldParseProc p, const void* u, Int o)
119+
void set(const char* t, INIFieldParseProc p, const void* u, Int o)
120120
{
121121
token = t;
122122
parse = p;
@@ -144,9 +144,9 @@ class MultiIniFieldParse
144144

145145
void add(const FieldParse* f, UnsignedInt e = 0);
146146

147-
inline Int getCount() const { return m_count; }
148-
inline const FieldParse* getNthFieldParse(Int i) const { return m_fieldParse[i]; }
149-
inline UnsignedInt getNthExtraOffset(Int i) const { return m_extraOffset[i]; }
147+
Int getCount() const { return m_count; }
148+
const FieldParse* getNthFieldParse(Int i) const { return m_fieldParse[i]; }
149+
UnsignedInt getNthExtraOffset(Int i) const { return m_extraOffset[i]; }
150150
};
151151

152152
//-------------------------------------------------------------------------------------------------
@@ -248,14 +248,14 @@ class INI
248248
static void parseWindowTransitions( INI* ini );
249249
static void parseChallengeModeDefinition( INI* ini );
250250

251-
inline AsciiString getFilename( void ) const { return m_filename; }
252-
inline INILoadType getLoadType( void ) const { return m_loadType; }
253-
inline UnsignedInt getLineNum( void ) const { return m_lineNum; }
254-
inline const char *getSeps( void ) const { return m_seps; }
255-
inline const char *getSepsPercent( void ) const { return m_sepsPercent; }
256-
inline const char *getSepsColon( void ) const { return m_sepsColon; }
257-
inline const char *getSepsQuote( void ) { return m_sepsQuote; }
258-
inline Bool isEOF( void ) const { return m_endOfFile; }
251+
AsciiString getFilename( void ) const { return m_filename; }
252+
INILoadType getLoadType( void ) const { return m_loadType; }
253+
UnsignedInt getLineNum( void ) const { return m_lineNum; }
254+
const char *getSeps( void ) const { return m_seps; }
255+
const char *getSepsPercent( void ) const { return m_sepsPercent; }
256+
const char *getSepsColon( void ) const { return m_sepsColon; }
257+
const char *getSepsQuote( void ) { return m_sepsQuote; }
258+
Bool isEOF( void ) const { return m_endOfFile; }
259259

260260
void initFromINI( void *what, const FieldParse* parseTable );
261261
void initFromINIMulti( void *what, const MultiIniFieldParse& parseTableList );

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Money : public Snapshot
6161

6262
public:
6363

64-
inline Money() : m_playerIndex(0)
64+
Money() : m_playerIndex(0)
6565
{
6666
init();
6767
}
@@ -71,7 +71,7 @@ class Money : public Snapshot
7171
setStartingCash(0);
7272
}
7373

74-
inline UnsignedInt countMoney() const
74+
UnsignedInt countMoney() const
7575
{
7676
return m_money;
7777
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ class StaticNameKey
153153
StaticNameKey(const char* p) : m_key(NAMEKEY_INVALID), m_name(p) {}
154154
NameKeyType key() const;
155155
// ugh, this is a little hokey, but lets us pretend that a StaticNameKey == NameKeyType
156-
inline operator NameKeyType() const { return key(); }
156+
operator NameKeyType() const { return key(); }
157157
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class SubsystemInterface
128128
Bool m_dumpUpdate;
129129
Bool m_dumpDraw;
130130
#else
131-
inline void UPDATE(void) {update();}
132-
inline void DRAW(void) {draw();}
131+
void UPDATE(void) {update();}
132+
void DRAW(void) {draw();}
133133
#endif
134134
protected:
135135
AsciiString m_name;

0 commit comments

Comments
 (0)