aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-09-09 20:38:04 +0200
committerGitHub <noreply@github.com>2020-09-09 20:38:04 +0200
commitcd28423a4e813baf6833f38c93613a7f82a721f8 (patch)
treef8461904532942d916e71b1822319d1a7e1ad691 /src/server/game/Globals/ObjectMgr.cpp
parent4f636b80e4942c4c9c4811496d1c1b77f767378d (diff)
[3.3.5] Core/Guilds: Guild cleanup (PR #25422)
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 8498e19dfc5..c900c4f0ed9 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -8501,7 +8501,7 @@ void ObjectMgr::LoadReservedPlayersNames()
TC_LOG_INFO("server.loading", ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
-bool ObjectMgr::IsReservedName(const std::string& name) const
+bool ObjectMgr::IsReservedName(std::string_view name) const
{
std::wstring wstr;
if (!Utf8toWStr (name, wstr))
@@ -8585,7 +8585,7 @@ bool isValidString(const std::wstring& wstr, uint32 strictMask, bool numericOrSp
return false;
}
-ResponseCodes ObjectMgr::CheckPlayerName(std::string const& name, LocaleConstant locale, bool create /*= false*/)
+ResponseCodes ObjectMgr::CheckPlayerName(std::string_view name, LocaleConstant locale, bool create /*= false*/)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))
@@ -8610,7 +8610,7 @@ ResponseCodes ObjectMgr::CheckPlayerName(std::string const& name, LocaleConstant
return ValidateName(wname, locale);
}
-bool ObjectMgr::IsValidCharterName(const std::string& name)
+bool ObjectMgr::IsValidCharterName(std::string_view name)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))
@@ -8628,7 +8628,7 @@ bool ObjectMgr::IsValidCharterName(const std::string& name)
return isValidString(wname, strictMask, true);
}
-PetNameInvalidReason ObjectMgr::CheckPetName(const std::string& name, LocaleConstant locale)
+PetNameInvalidReason ObjectMgr::CheckPetName(std::string_view name, LocaleConstant locale)
{
std::wstring wname;
if (!Utf8toWStr(name, wname))
@@ -8930,7 +8930,7 @@ void ObjectMgr::LoadGameTele()
TC_LOG_INFO("server.loading", ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
-GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
+GameTele const* ObjectMgr::GetGameTele(std::string_view name) const
{
// explicit name case
std::wstring wname;
@@ -8953,7 +8953,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
return alt;
}
-GameTele const* ObjectMgr::GetGameTeleExactName(const std::string& name) const
+GameTele const* ObjectMgr::GetGameTeleExactName(std::string_view name) const
{
// explicit name case
std::wstring wname;
@@ -9005,7 +9005,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
return true;
}
-bool ObjectMgr::DeleteGameTele(const std::string& name)
+bool ObjectMgr::DeleteGameTele(std::string_view name)
{
// explicit name case
std::wstring wname;
@@ -9680,7 +9680,7 @@ uint32 ObjectMgr::GetScriptId(std::string const& name)
return 0;
ScriptNameContainer::const_iterator itr = std::lower_bound(_scriptNamesStore.begin(), _scriptNamesStore.end(), name);
- if (itr == _scriptNamesStore.end() || *itr != name)
+ if (itr == _scriptNamesStore.end() || (*itr != name))
return 0;
return uint32(itr - _scriptNamesStore.begin());