mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-08 05:11:09 +00:00
refactor(Core/Common): restyle common lib with astyle (#3461)
This commit is contained in:
@@ -6,22 +6,23 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
char const* localeNames[TOTAL_LOCALES] = {
|
||||
"enUS",
|
||||
"koKR",
|
||||
"frFR",
|
||||
"deDE",
|
||||
"zhCN",
|
||||
"zhTW",
|
||||
"esES",
|
||||
"esMX",
|
||||
"ruRU"
|
||||
char const* localeNames[TOTAL_LOCALES] =
|
||||
{
|
||||
"enUS",
|
||||
"koKR",
|
||||
"frFR",
|
||||
"deDE",
|
||||
"zhCN",
|
||||
"zhTW",
|
||||
"esES",
|
||||
"esMX",
|
||||
"ruRU"
|
||||
};
|
||||
|
||||
LocaleConstant GetLocaleByName(const std::string& name)
|
||||
{
|
||||
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
|
||||
if (name==localeNames[i])
|
||||
if (name == localeNames[i])
|
||||
return LocaleConstant(i);
|
||||
|
||||
return LOCALE_enUS; // including enGB case
|
||||
@@ -30,8 +31,8 @@ LocaleConstant GetLocaleByName(const std::string& name)
|
||||
void CleanStringForMysqlQuery(std::string& str)
|
||||
{
|
||||
std::string::size_type n = 0;
|
||||
while ((n=str.find('\\')) != str.npos) str.erase(n,1);
|
||||
while ((n=str.find('"')) != str.npos) str.erase(n,1);
|
||||
while ((n=str.find('\'')) != str.npos) str.erase(n,1);
|
||||
while ((n = str.find('\\')) != str.npos) str.erase(n, 1);
|
||||
while ((n = str.find('"')) != str.npos) str.erase(n, 1);
|
||||
while ((n = str.find('\'')) != str.npos) str.erase(n, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user