Permalink
Browse files

[ARMT] improved CCommon::StrToLower

  • Loading branch information...
1 parent e48b7b4 commit b03eff018dabb558328ae10df709800445e222b3 @gnif committed Nov 4, 2012
Showing with 4 additions and 5 deletions.
  1. +3 −4 common/CCommon.cc
  2. +1 −1 common/CCommon.h
View
@@ -121,11 +121,10 @@ std::string CCommon::IntToStr(int value, int base/* = 10*/)
return buf;
}
-std::string CCommon::StrToLower(const std::string &string)
+std::string CCommon::StrToLower(std::string string)
{
- std::string result = string;
- std::transform(result.begin(), result.end(), result.begin(), ::tolower);
- return result;
+ std::transform(string.begin(), string.end(), string.begin(), ::tolower);
+ return string;
}
bool CCommon::IsFile(const std::string &path)
View
@@ -40,7 +40,7 @@ class CCommon
static bool IsBE() { return m_isBE; }
static void Trim (std::string &s);
static std::string IntToStr(int value, int base = 10);
- static std::string StrToLower(const std::string &string);
+ static std::string StrToLower(std::string string);
static const std::string &GetExePath () { return m_exePath ; }
static const std::string &GetBasePath() { return m_basePath; }

0 comments on commit b03eff0

Please sign in to comment.