500% performance gain in to_lower / to_upper
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 11 Apr 2006 09:11:06 +0000 (09:11 +0000)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Tue, 11 Apr 2006 09:11:06 +0000 (09:11 +0000)
src/stringfunc.cpp

index f7280f2..644e1ed 100644 (file)
@@ -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]);