]> git.saurik.com Git - wxWidgets.git/commitdiff
unused variable, more efficient increment operator
authorPaul Cornett <paulcor@bullseye.com>
Sat, 22 Sep 2007 04:40:21 +0000 (04:40 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 22 Sep 2007 04:40:21 +0000 (04:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index ff87c095c72a80cc715368a53031853795e2facb..fbfe6cb6b5dfe16e641c434bcf5aa3855cabf9f1 100644 (file)
@@ -975,13 +975,12 @@ int wxString::CmpNoCase(const wxString& s) const
 {
     // FIXME-UTF8: use wxUniChar::ToLower/ToUpper once added
 
-    size_t idx = 0;
     const_iterator i1 = begin();
     const_iterator end1 = end();
     const_iterator i2 = s.begin();
     const_iterator end2 = s.end();
 
-    for ( ; i1 != end1 && i2 != end2; ++idx, ++i1, ++i2 )
+    for ( ; i1 != end1 && i2 != end2; ++i1, ++i2 )
     {
         wxUniChar lower1 = (wxChar)wxTolower(*i1);
         wxUniChar lower2 = (wxChar)wxTolower(*i2);
@@ -1353,7 +1352,7 @@ wxString& wxString::Trim(bool bFromRight)
             // find last non-space character
             reverse_iterator psz = rbegin();
             while ( (psz != rend()) && wxSafeIsspace(*psz) )
-                psz++;
+                ++psz;
 
             // truncate at trailing space start
             erase(psz.base(), end());
@@ -1363,7 +1362,7 @@ wxString& wxString::Trim(bool bFromRight)
             // find first non-space character
             iterator psz = begin();
             while ( (psz != end()) && wxSafeIsspace(*psz) )
-                psz++;
+                ++psz;
 
             // fix up data and length
             erase(begin(), psz);