summaryrefslogtreecommitdiff
path: root/src/common/Common.cpp
diff options
context:
space:
mode:
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); }
}