Permalink
Browse files

CString: Don't repeat ourselves

  • Loading branch information...
1 parent da33604 commit 3347390cfcd24af48090f47a9f0818b89dcd6026 Kyle Fuller committed Aug 19, 2012
Showing with 2 additions and 14 deletions.
  1. +2 −14 src/ZNCString.cpp
View
@@ -144,25 +144,13 @@ CString& CString::MakeLower() {
CString CString::AsUpper() const {
CString sRet = *this;
-
- for (size_type a = 0; a < length(); a++) {
- char& c = sRet[a];
- //TODO use unicode
- c = (char)toupper(c);
- }
-
+ sRet.MakeUpper();
return sRet;
}
CString CString::AsLower() const {
CString sRet = *this;
-
- for (size_type a = 0; a < length(); a++) {
- char& c = sRet[a];
- //TODO use unicode
- c = (char)tolower(c);
- }
-
+ sRet.MakeLower();
return sRet;
}

0 comments on commit 3347390

Please sign in to comment.