1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Pass arguments by reference

This commit is contained in:
Selat 2014-02-27 23:12:59 +03:00 committed by ShadowNinja
parent 2bc2ce3bd1
commit 7cac34c807
14 changed files with 49 additions and 49 deletions

View file

@ -3046,8 +3046,8 @@ void Server::SendChatMessage(u16 peer_id, const std::wstring &message)
}
}
void Server::SendShowFormspecMessage(u16 peer_id, const std::string formspec,
const std::string formname)
void Server::SendShowFormspecMessage(u16 peer_id, const std::string &formspec,
const std::string &formname)
{
DSTACK(__FUNCTION_NAME);
@ -3871,8 +3871,8 @@ struct SendableMediaAnnouncement
std::string name;
std::string sha1_digest;
SendableMediaAnnouncement(const std::string name_="",
const std::string sha1_digest_=""):
SendableMediaAnnouncement(const std::string &name_="",
const std::string &sha1_digest_=""):
name(name_),
sha1_digest(sha1_digest_)
{}
@ -3933,8 +3933,8 @@ struct SendableMedia
std::string path;
std::string data;
SendableMedia(const std::string &name_="", const std::string path_="",
const std::string &data_=""):
SendableMedia(const std::string &name_="", const std::string &path_="",
const std::string &data_=""):
name(name_),
path(path_),
data(data_)
@ -4385,7 +4385,7 @@ std::string Server::getBanDescription(const std::string &ip_or_name)
return m_banmanager->getBanDescription(ip_or_name);
}
void Server::notifyPlayer(const char *name, const std::wstring msg)
void Server::notifyPlayer(const char *name, const std::wstring &msg)
{
Player *player = m_env->getPlayer(name);
if(!player)
@ -4498,7 +4498,7 @@ bool Server::overrideDayNightRatio(Player *player, bool do_override,
return true;
}
void Server::notifyPlayers(const std::wstring msg)
void Server::notifyPlayers(const std::wstring &msg)
{
SendChatMessage(PEER_ID_INEXISTENT,msg);
}