Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/AsciiString.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ class AsciiString
unsigned short m_numCharsAllocated; // length of data allocated
// char m_stringdata[];

inline char* peek() { return (char*)(this+1); }
char* peek() { return (char*)(this+1); }
};

#ifdef RTS_DEBUG
void validate() const;
#else
inline void validate() const { }
void validate() const { }
#endif

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

/**
return true iff self starts with the given string. (case insensitive)
*/
Bool startsWithNoCase(const char* p) const;
inline Bool startsWithNoCase(const AsciiString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
Bool startsWithNoCase(const AsciiString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }

/**
return true iff self ends with the given string.
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/GameMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ class MemoryPoolObject
virtual ~MemoryPoolObject() { }

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

protected:

Expand Down
18 changes: 9 additions & 9 deletions Core/GameEngine/Include/Common/Radar.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ class RadarObject : public MemoryPoolObject,

// color management
void setColor( Color c ) { m_color = c; }
inline Color getColor( void ) const { return m_color; }
Color getColor( void ) const { return m_color; }

inline void friend_setObject( Object *obj ) { m_object = obj; }
inline Object *friend_getObject( void ) { return m_object; }
inline const Object *friend_getObject( void ) const { return m_object; }
void friend_setObject( Object *obj ) { m_object = obj; }
Object *friend_getObject( void ) { return m_object; }
const Object *friend_getObject( void ) const { return m_object; }

inline void friend_setNext( RadarObject *next ) { m_next = next; }
inline RadarObject *friend_getNext( void ) { return m_next; }
inline const RadarObject *friend_getNext( void ) const { return m_next; }
void friend_setNext( RadarObject *next ) { m_next = next; }
RadarObject *friend_getNext( void ) { return m_next; }
const RadarObject *friend_getNext( void ) const { return m_next; }

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

inline Real getTerrainAverageZ() const { return m_terrainAverageZ; }
inline Real getWaterAverageZ() const { return m_waterAverageZ; }
Real getTerrainAverageZ() const { return m_terrainAverageZ; }
Real getWaterAverageZ() const { return m_waterAverageZ; }

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

Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/UnicodeString.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ class UnicodeString
unsigned short m_numCharsAllocated; // length of data allocated
// WideChar m_stringdata[];

inline WideChar* peek() { return (WideChar*)(this+1); }
WideChar* peek() { return (WideChar*)(this+1); }
};

#ifdef RTS_DEBUG
void validate() const;
#else
inline void validate() const { }
void validate() const { }
#endif

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

/**
return true iff self starts with the given string. (case insensitive)
*/
Bool startsWithNoCase(const WideChar* p) const;
inline Bool startsWithNoCase(const UnicodeString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }
Bool startsWithNoCase(const UnicodeString& stringSrc) const { return startsWithNoCase(stringSrc.str()); }

/**
return true iff self ends with the given string.
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameClient/ClientRandomValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class GameClientRandomVariable
void setRange( Real low, Real high, DistributionType type = UNIFORM );

Real getValue( void ) const; ///< return a value from the random distribution
inline Real getMinimumValue( void ) const { return m_low; }
inline Real getMaximumValue( void ) const { return m_high; }
inline DistributionType getDistributionType( void ) const { return m_type; }
Real getMinimumValue( void ) const { return m_low; }
Real getMaximumValue( void ) const { return m_high; }
DistributionType getDistributionType( void ) const { return m_type; }
protected:
DistributionType m_type; ///< the kind of random distribution
Real m_low, m_high; ///< the range of random values
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameClient/Smudge.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class SmudgeManager

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

protected:

Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameLogic/LogicRandomValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class GameLogicRandomVariable
void setRange( Real low, Real high, DistributionType type = UNIFORM );

Real getValue( void ) const; ///< return a value from the random distribution
inline Real getMinimumValue( void ) const { return m_low; }
inline Real getMaximumValue( void ) const { return m_high; }
inline DistributionType getDistributionType( void ) const { return m_type; }
Real getMinimumValue( void ) const { return m_low; }
Real getMaximumValue( void ) const { return m_high; }
DistributionType getDistributionType( void ) const { return m_type; }
protected:
DistributionType m_type; ///< the kind of random distribution
Real m_low, m_high; ///< the range of random values
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/GameNetwork/FirewallHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,28 +211,28 @@ class FirewallHelperClass {
/*
** Behavior query functions.
*/
inline Bool isNAT(void) {
Bool isNAT(void) {
if (m_behavior == FIREWALL_TYPE_UNKNOWN || (m_behavior & FIREWALL_TYPE_SIMPLE) != 0) {
return(FALSE);
}
return(TRUE);
};

inline Bool isNAT(FirewallBehaviorType behavior) {
Bool isNAT(FirewallBehaviorType behavior) {
if (behavior == FIREWALL_TYPE_UNKNOWN || (behavior & FIREWALL_TYPE_SIMPLE) != 0) {
return(FALSE);
}
return(TRUE);
};

inline Bool isNetgear(FirewallBehaviorType behavior) {
Bool isNetgear(FirewallBehaviorType behavior) {
if ((behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
return(TRUE);
}
return(FALSE);
};

inline Bool isNetgear(void) {
Bool isNetgear(void) {
if ((m_behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
return(TRUE);
}
Expand Down
24 changes: 12 additions & 12 deletions Core/GameEngine/Include/GameNetwork/GameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,22 @@ class GameSlot
void setTeamNumber( Int teamNumber ) { m_teamNumber = teamNumber; }
Int getTeamNumber( void ) const { return m_teamNumber; }

inline void setName( UnicodeString name ) { m_name = name; }
inline UnicodeString getName( void ) const { return m_name; }
void setName( UnicodeString name ) { m_name = name; }
UnicodeString getName( void ) const { return m_name; }

inline void setIP( UnsignedInt IP ) { m_IP = IP; }
inline UnsignedInt getIP( void ) const { return m_IP; }
void setIP( UnsignedInt IP ) { m_IP = IP; }
UnsignedInt getIP( void ) const { return m_IP; }

inline void setPort( UnsignedShort port ) { m_port = port; }
inline UnsignedShort getPort( void ) const { return m_port; }
void setPort( UnsignedShort port ) { m_port = port; }
UnsignedShort getPort( void ) const { return m_port; }

inline void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
inline FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }
void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }

void saveOffOriginalInfo( void );
inline Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
inline Int getOriginalColor( void ) const { return m_origColor; }
inline Int getOriginalStartPos( void ) const { return m_origStartPos; }
Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
Int getOriginalColor( void ) const { return m_origColor; }
Int getOriginalStartPos( void ) const { return m_origStartPos; }
Int getApparentPlayerTemplate( void ) const;
Int getApparentColor( void ) const;
Int getApparentStartPos( void ) const;
Expand Down Expand Up @@ -215,7 +215,7 @@ class GameInfo

// CRC checking hack
void setCRCInterval( Int val ) { m_crcInterval = (val<100)?val:100; }
inline Int getCRCInterval( void ) const { return m_crcInterval; }
Int getCRCInterval( void ) const { return m_crcInterval; }

Bool haveWeSurrendered(void) { return m_surrendered; }
void markAsSurrendered(void) { m_surrendered = TRUE; }
Expand Down
70 changes: 35 additions & 35 deletions Core/GameEngine/Include/GameNetwork/GameSpy/StagingRoomGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class GameSpyGameSlot : public GameSlot
void setFavoriteSide( Int val ) { m_favoriteSide = val; }

void setPingString( AsciiString pingStr );
inline AsciiString getPingString( void ) const { return m_pingStr; }
inline Int getPingAsInt( void ) const { return m_pingInt; }
AsciiString getPingString( void ) const { return m_pingStr; }
Int getPingAsInt( void ) const { return m_pingInt; }

protected:
Int m_profileID;
Expand Down Expand Up @@ -99,37 +99,37 @@ class GameSpyStagingRoom : public GameInfo
virtual void reset( void );

void cleanUpSlotPointers(void);
inline void setID(Int id) { m_id = id; }
inline Int getID( void ) const { return m_id; }

inline void setHasPassword(Bool val) { m_requiresPassword = val; }
inline Bool getHasPassword(void) const { return m_requiresPassword; }
inline void setAllowObservers(Bool val) { m_allowObservers = val; }
inline Bool getAllowObservers(void) const { return m_allowObservers; }

inline void setVersion(UnsignedInt val) { m_version = val; }
inline UnsignedInt getVersion(void) const { return m_version; }
inline void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
inline UnsignedInt getExeCRC(void) const { return m_exeCRC; }
inline void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
inline UnsignedInt getIniCRC(void) const { return m_iniCRC; }

inline void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
inline Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }

inline void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
inline Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }

inline void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
inline Int getReportedNumObservers(void) const { return m_reportedNumObservers; }

inline void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
inline AsciiString getLadderIP( void ) const { return m_ladderIP; }
inline void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
inline UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
void setID(Int id) { m_id = id; }
Int getID( void ) const { return m_id; }

void setHasPassword(Bool val) { m_requiresPassword = val; }
Bool getHasPassword(void) const { return m_requiresPassword; }
void setAllowObservers(Bool val) { m_allowObservers = val; }
Bool getAllowObservers(void) const { return m_allowObservers; }

void setVersion(UnsignedInt val) { m_version = val; }
UnsignedInt getVersion(void) const { return m_version; }
void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
UnsignedInt getExeCRC(void) const { return m_exeCRC; }
void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
UnsignedInt getIniCRC(void) const { return m_iniCRC; }

void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }

void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }

void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
Int getReportedNumObservers(void) const { return m_reportedNumObservers; }

void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
AsciiString getLadderIP( void ) const { return m_ladderIP; }
void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
void setPingString( AsciiString pingStr );
inline AsciiString getPingString( void ) const { return m_pingStr; }
inline Int getPingAsInt( void ) const { return m_pingInt; }
AsciiString getPingString( void ) const { return m_pingStr; }
Int getPingAsInt( void ) const { return m_pingInt; }

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

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

inline void setGameName( UnicodeString name ) { m_gameName = name; }
inline UnicodeString getGameName( void ) const { return m_gameName; }
void setGameName( UnicodeString name ) { m_gameName = name; }
UnicodeString getGameName( void ) const { return m_gameName; }

inline void setLocalName( AsciiString name ) { m_localName = name; }
void setLocalName( AsciiString name ) { m_localName = name; }
};

extern GameSpyStagingRoom *TheGameSpyGame;
12 changes: 6 additions & 6 deletions Core/GameEngine/Include/GameNetwork/IPEnumeration.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ class EnumeratedIP : public MemoryPoolObject
EnumeratedIP() { m_IPstring = ""; m_next = NULL; m_IP = 0; }

// Access functions
inline AsciiString getIPstring( void ) { return m_IPstring; }
inline void setIPstring( AsciiString name ) { m_IPstring = name; }
inline UnsignedInt getIP( void ) { return m_IP; }
inline void setIP( UnsignedInt IP ) { m_IP = IP; }
inline EnumeratedIP *getNext( void ) { return m_next; }
inline void setNext( EnumeratedIP *next ) { m_next = next; }
AsciiString getIPstring( void ) { return m_IPstring; }
void setIPstring( AsciiString name ) { m_IPstring = name; }
UnsignedInt getIP( void ) { return m_IP; }
void setIP( UnsignedInt IP ) { m_IP = IP; }
EnumeratedIP *getNext( void ) { return m_next; }
void setNext( EnumeratedIP *next ) { m_next = next; }

protected:
AsciiString m_IPstring;
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameNetwork/LANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ class LANAPI : public LANAPIInterface
virtual Bool SetLocalIP( UnsignedInt localIP ); ///< For multiple NIC machines
virtual void SetLocalIP( AsciiString localIP ); ///< For multiple NIC machines
virtual Bool AmIHost( void ); ///< Am I hosting a game?
virtual inline UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
virtual inline LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
virtual inline UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
virtual UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
virtual LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
virtual UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
virtual void fillInLANMessage( LANMessage *msg ); ///< Fill in default params
virtual void checkMOTD( void );
protected:
Expand Down
Loading
Loading