diff options
author | Kargatum <dowlandtop@yandex.com> | 2020-09-12 03:50:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 03:50:48 +0700 |
commit | 3a0b0356ac2314d6e83ec9b52cddcfb15bf0da8a (patch) | |
tree | 916c49701ec8dc4bdb59ed0e5722740107df2d3d /src/common/Common.cpp | |
parent | e15a4939275e14b4d8ee2df94049edb34d57954e (diff) |
refactor(Core/Common): restyle common lib with astyle (#3461)
Diffstat (limited to 'src/common/Common.cpp')
-rw-r--r-- | src/common/Common.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/common/Common.cpp b/src/common/Common.cpp index d92e22bdff..d117554061 100644 --- a/src/common/Common.cpp +++ b/src/common/Common.cpp @@ -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); } |