]> git.saurik.com Git - wxWidgets.git/commitdiff
Get rid of superflous if statement - taken care of by the following for loop
authorRyan Norton <wxprojects@comcast.net>
Sat, 9 Apr 2005 06:42:42 +0000 (06:42 +0000)
committerRyan Norton <wxprojects@comcast.net>
Sat, 9 Apr 2005 06:42:42 +0000 (06:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index b4857f3b57fe3bdcecda123dc5f49ff48a2fc873..2d608d1eb8dae9a661e47e821148c52f963a61be 100644 (file)
@@ -742,11 +742,8 @@ wxStringBase& wxStringBase::replace(size_t nStart, size_t nLen,
   //
   //Also, we can't use append with the full character pointer and must
   //do it manually because this string can contain null characters
-  if ( nStart != 0 )
-  {
-      for(size_t i1 = 0; i1 < nStart; ++i1)
-          strTmp.append(1, this->c_str()[i1]);
-  }
+  for(size_t i1 = 0; i1 < nStart; ++i1)
+      strTmp.append(1, this->c_str()[i1]);
   
   //its safe to do the full version here because
   //sz must be a normal c string