mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[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:
@@ -2,7 +2,7 @@
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/strings.h"
|
||||
|
||||
void CombatRecord::Start(std::string in_mob_name)
|
||||
void CombatRecord::Start(const std::string& in_mob_name)
|
||||
{
|
||||
m_start_time = std::time(nullptr);
|
||||
m_end_time = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
class CombatRecord {
|
||||
public:
|
||||
void Start(std::string in_mob_name);
|
||||
void Start(const std::string& in_mob_name);
|
||||
void Stop();
|
||||
bool InCombat() const;
|
||||
void ProcessHPEvent(int64 hp, int64 current_hp);
|
||||
|
||||
+3
-3
@@ -98,7 +98,7 @@ void Embperl::DoInit() {
|
||||
try {
|
||||
init_eval_file();
|
||||
}
|
||||
catch(std::string e)
|
||||
catch(std::string& e)
|
||||
{
|
||||
//remember... lasterr() is no good if we crap out here, in construction
|
||||
LogQuests("Perl Error [{}]", e);
|
||||
@@ -138,7 +138,7 @@ void Embperl::DoInit() {
|
||||
perl_command = "main::eval_file('plugin', '" + Config->PluginPlFile + "');";
|
||||
eval_pv(perl_command.c_str(), FALSE);
|
||||
}
|
||||
catch(std::string e)
|
||||
catch(std::string& e)
|
||||
{
|
||||
LogQuests("Warning [{}]: [{}]", Config->PluginPlFile, e);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void Embperl::DoInit() {
|
||||
"}";
|
||||
eval_pv(perl_command.c_str(),FALSE);
|
||||
}
|
||||
catch(std::string e)
|
||||
catch(std::string& e)
|
||||
{
|
||||
LogQuests("Warning [{}]", e);
|
||||
}
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ public:
|
||||
void AddRaidLooter(const char* looter);
|
||||
void RemoveRaidLooter(const char* looter);
|
||||
|
||||
inline void SetRaidMOTD(std::string in_motd) { motd = in_motd; };
|
||||
inline void SetRaidMOTD(const std::string& in_motd) { motd = in_motd; };
|
||||
|
||||
//util func
|
||||
//keeps me from having to keep iterating through the list
|
||||
|
||||
Reference in New Issue
Block a user