mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8009] Pass const string reference to functions where possible.
Avoids creating an unnecessary copy of strings. Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
55836df62f
commit
a34e7857f1
5 changed files with 5 additions and 5 deletions
|
|
@ -10495,7 +10495,7 @@ void CharmInfo::SetPetNumber(uint32 petnumber, bool statwindow)
|
|||
m_unit->SetUInt32Value(UNIT_FIELD_PETNUMBER, 0);
|
||||
}
|
||||
|
||||
void CharmInfo::LoadPetActionBar( std::string data )
|
||||
void CharmInfo::LoadPetActionBar(const std::string& data )
|
||||
{
|
||||
InitPetActionBar();
|
||||
|
||||
|
|
|
|||
|
|
@ -823,7 +823,7 @@ struct CharmInfo
|
|||
//return true if successful
|
||||
bool AddSpellToActionBar(uint32 spellid, ActiveStates newstate = ACT_DECIDE);
|
||||
bool RemoveSpellFromActionBar(uint32 spell_id);
|
||||
void LoadPetActionBar(std::string data);
|
||||
void LoadPetActionBar(const std::string& data);
|
||||
void BuildActionBar(WorldPacket* data);
|
||||
void SetSpellAutocast(uint32 spell_id, bool state);
|
||||
void SetActionBar(uint8 index, uint32 spellOrAction,ActiveStates type)
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ class World
|
|||
void SetAllowMovement(bool allow) { m_allowMovement = allow; }
|
||||
|
||||
/// Set a new Message of the Day
|
||||
void SetMotd(std::string motd) { m_motd = motd; }
|
||||
void SetMotd(const std::string& motd) { m_motd = motd; }
|
||||
/// Get the current Message of the Day
|
||||
const char* GetMotd() const { return m_motd.c_str(); }
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ struct AccountData
|
|||
|
||||
struct AddonInfo
|
||||
{
|
||||
AddonInfo(std::string name, uint8 enabled, uint32 crc)
|
||||
AddonInfo(const std::string& name, uint8 enabled, uint32 crc)
|
||||
{
|
||||
Name = name;
|
||||
Enabled = enabled;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8008"
|
||||
#define REVISION_NR "8009"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue