From: Thomas Jarosch Date: Tue, 11 Apr 2006 09:11:06 +0000 (+0000) Subject: 500% performance gain in to_lower / to_upper X-Git-Tag: v2.6~212 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=ca189cac2ab797af9b4d96a605ffcde5b7ffcac4;p=libi2ncommon 500% performance gain in to_lower / to_upper --- diff --git a/src/stringfunc.cpp b/src/stringfunc.cpp index f7280f2..644e1ed 100644 --- a/src/stringfunc.cpp +++ b/src/stringfunc.cpp @@ -246,7 +246,7 @@ string to_lower(const string &src) { string dst = src; - string::size_type pos = 0, end = dst.size(); + string::size_type pos, end = dst.size(); for (pos = 0; pos < end; pos++) dst[pos] = tolower(dst[pos]); @@ -257,7 +257,7 @@ string to_upper(const string &src) { string dst = src; - string::size_type pos = 0, end = dst.size(); + string::size_type pos, end = dst.size(); for (pos = 0; pos < end; pos++) dst[pos] = toupper(dst[pos]);