]> git.saurik.com Git - wxWidgets.git/commitdiff
VC6 compilation fix (don't reuse the same variable in 2 for loops)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Mar 2007 15:13:22 +0000 (15:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Mar 2007 15:13:22 +0000 (15:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/graphics.cpp

index dbed8ff5c2dcd205a29c28129c2f096e22df072c..cd9dd2a3bbd8c05aa363e2da9954983d4bcb9c2d 100644 (file)
@@ -1169,7 +1169,8 @@ void wxGDIPlusContext::GetPartialTextExtents(const wxString& text, wxArrayDouble
 
     CharacterRange* ranges = new CharacterRange[len] ;
     Region* regions = new Region[len];
-    for( size_t i = 0 ; i < len ; ++i)
+    size_t i;
+    for( i = 0 ; i < len ; ++i)
     {
         ranges[i].First = i ;
         ranges[i].Length = 1 ;
@@ -1178,7 +1179,7 @@ void wxGDIPlusContext::GetPartialTextExtents(const wxString& text, wxArrayDouble
     m_context->MeasureCharacterRanges(ws, -1 , f,layoutRect, &strFormat,1,regions) ;
 
     RectF bbox ;
-    for ( size_t i = 0 ; i < len ; ++i)
+    for ( i = 0 ; i < len ; ++i)
     {
         regions[i].GetBounds(&bbox,m_context);
         widths[i] = bbox.GetRight()-bbox.GetLeft();