summaryrefslogtreecommitdiff
path: root/src/common/Common.cpp
diff options
context:
space:
mode:
authorKargatum <dowlandtop@yandex.com>2021-06-25 00:50:18 +0700
committerGitHub <noreply@github.com>2021-06-24 19:50:18 +0200
commit3c24b511f2fb2b23618e9cd0b24d28cb5afa34ad (patch)
tree78baa1669874acf8b7adf1c1994e383e814a3146 /src/common/Common.cpp
parent33c271cc7c191f72406873d81abd954525d093c0 (diff)
refactor(Core/Misc): add braces and impove codestyle (#6402)
Diffstat (limited to 'src/common/Common.cpp')
-rw-r--r--src/common/Common.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/Common.cpp b/src/common/Common.cpp
index 00e73a0a05..12e96b2c1d 100644
--- a/src/common/Common.cpp
+++ b/src/common/Common.cpp
@@ -23,7 +23,9 @@ LocaleConstant GetLocaleByName(const std::string& name)
{
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
if (name == localeNames[i])
+ {
return LocaleConstant(i);
+ }
return LOCALE_enUS; // including enGB case
}
@@ -31,7 +33,7 @@ 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); }
}