[Performance] Change to use Pass by reference where valid. (#3163)

* [Performance] Change to use Pass by reference where valid.

* typo
This commit is contained in:
Aeadoin
2023-04-01 22:55:40 -04:00
committed by GitHub
parent 7f7ba2e6c2
commit 1ffdd4cb34
31 changed files with 66 additions and 66 deletions
+8 -8
View File
@@ -98,18 +98,18 @@ public:
void AddToChannelList(ChatChannel *JoinedChannel);
void RemoveFromChannelList(ChatChannel *JoinedChannel);
void SendChannelMessage(std::string Message);
void SendChannelMessage(std::string ChannelName, std::string Message, Client *Sender);
void SendChannelMessage(const std::string& ChannelName, const std::string& Message, Client *Sender);
void SendChannelMessageByNumber(std::string Message);
void SendChannelList();
void CloseConnection();
void ToggleAnnounce(std::string State);
void ToggleAnnounce(const std::string& State);
bool IsAnnounceOn() { return (Announce == true); }
void AnnounceJoin(ChatChannel *Channel, Client *c);
void AnnounceLeave(ChatChannel *Channel, Client *c);
void GeneralChannelMessage(std::string Message);
void GeneralChannelMessage(const std::string& Message);
void GeneralChannelMessage(const char *Characters);
void SetChannelPassword(std::string ChannelPassword);
void ProcessChannelList(std::string CommandString);
void ProcessChannelList(const std::string& Input);
void AccountUpdate();
int ChannelCount();
std::string RemoveDuplicateChannels(std::string& in_channels);
@@ -139,14 +139,14 @@ public:
inline bool GetForceDisconnect() { return ForceDisconnect; }
std::string MailBoxName();
int GetMailBoxNumber() { return CurrentMailBox; }
int GetMailBoxNumber(std::string CharacterName);
int GetMailBoxNumber(const std::string& CharacterName);
void SetConnectionType(char c);
ConnectionType GetConnectionType() { return TypeOfConnection; }
EQ::versions::ClientVersion GetClientVersion() { return ClientVersion_; }
inline bool IsMailConnection() { return (TypeOfConnection == ConnectionTypeMail) || (TypeOfConnection == ConnectionTypeCombined); }
void SendNotification(int MailBoxNumber, std::string From, std::string Subject, int MessageID);
void SendNotification(int MailBoxNumber, const std::string& Subject, const std::string& From, int MessageID);
void ChangeMailBox(int NewMailBox);
inline void SetMailBox(int NewMailBox) { CurrentMailBox = NewMailBox; }
void SendFriends();
@@ -184,10 +184,10 @@ public:
Clientlist(int MailPort);
void Process();
void CloseAllConnections();
Client *FindCharacter(std::string CharacterName);
Client *FindCharacter(const std::string& CharacterName);
void CheckForStaleConnectionsAll();
void CheckForStaleConnections(Client *c);
Client *IsCharacterOnline(std::string CharacterName);
Client *IsCharacterOnline(const std::string& CharacterName);
void ProcessOPMailCommand(Client* c, std::string command_string, bool command_directed = false);
private: