Performance Changes: Removed the passing by value of large objects

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@222 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2005-06-29 20:54:44 +00:00
parent f083c5eb31
commit 8c9da6f517
5 changed files with 6 additions and 6 deletions

View file

@ -796,7 +796,7 @@ void AvHMP3Audio::ClearSoundNameList()
sSoundList.clear(); sSoundList.clear();
} }
StringList AvHMP3Audio::GetSoundNameList() const StringList& AvHMP3Audio::GetSoundNameList()
{ {
return sSoundList; return sSoundList;
} }

View file

@ -259,7 +259,7 @@ public:
void EXPORT SpecialSoundUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void EXPORT SpecialSoundUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
static void ClearSoundNameList(); static void ClearSoundNameList();
static StringList GetSoundNameList(); static const StringList& GetSoundNameList();
private: private:
static StringList sSoundList; static StringList sSoundList;

View file

@ -1368,7 +1368,7 @@ bool AvHGamerules::GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber inT
return theCanJoinTeam; return theCanJoinTeam;
} }
AvHBaseInfoLocationListType AvHGamerules::GetInfoLocations() const const AvHBaseInfoLocationListType& AvHGamerules::GetInfoLocations() const
{ {
return mInfoLocations; return mInfoLocations;
} }

View file

@ -226,7 +226,7 @@ public:
bool GetIsTesting(void) const; bool GetIsTesting(void) const;
bool GetIsValidFutureTeam(AvHPlayer inPlayer, int inTeamNumber) const; bool GetIsValidFutureTeam(AvHPlayer inPlayer, int inTeamNumber) const;
bool GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber theTeamNumber, string& outString) const; bool GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber theTeamNumber, string& outString) const;
AvHBaseInfoLocationListType GetInfoLocations() const; const AvHBaseInfoLocationListType& GetInfoLocations() const;
int GetMaxWeight(void) const; int GetMaxWeight(void) const;
const char* GetSpawnEntityName(AvHPlayer* inPlayer) const; const char* GetSpawnEntityName(AvHPlayer* inPlayer) const;
Vector GetSpawnAreaCenter(AvHTeamNumber inTeamNumber) const; Vector GetSpawnAreaCenter(AvHTeamNumber inTeamNumber) const;

View file

@ -10285,7 +10285,7 @@ void AvHPlayer::UpdateParticleTemplates()
void AvHPlayer::UpdateInfoLocations() void AvHPlayer::UpdateInfoLocations()
{ {
// Get map location list // Get map location list
AvHBaseInfoLocationListType theInfoLocations = GetGameRules()->GetInfoLocations(); const AvHBaseInfoLocationListType& theInfoLocations = GetGameRules()->GetInfoLocations();
// Compare with ours, send one down each tick (assumes that previous ones sent don't change) // Compare with ours, send one down each tick (assumes that previous ones sent don't change)
int theNumClientInfoLocations = this->mClientInfoLocations.size(); int theNumClientInfoLocations = this->mClientInfoLocations.size();
@ -10533,7 +10533,7 @@ void AvHPlayer::UpdateSoundNames()
if(this->pev != NULL ) // Not fully connected yet if(this->pev != NULL ) // Not fully connected yet
{ {
// Send list of special sounds // Send list of special sounds
StringList theSoundNameList = AvHMP3Audio::GetSoundNameList(); const StringList& theSoundNameList = AvHMP3Audio::GetSoundNameList();
int theNumberOfSounds = theSoundNameList.size(); int theNumberOfSounds = theSoundNameList.size();
int theNumberOfSoundsOnClient = this->mClientSoundNames.size(); int theNumberOfSoundsOnClient = this->mClientSoundNames.size();