From 5d98e603bc42b09c4f3e47a89dc09f174d7a22e4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 29 Jun 2013 12:53:21 +0000 Subject: [PATCH 1/1] Fix VC6 compilation of wxRichTextTable code. In addition to breaking VC6 build, the code also rather strangely declared "row" inside a for loop first and then declared it in the function scope. Leave just the second declaration. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index b15c5c5f49..86c41cfb5a 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -9397,7 +9397,8 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot const int colCount = table->GetColumnCount(); wxArrayInt rowTops; rowTops.Add(0, rowCount+1); - for (int row = 0; row < rowCount; ++row) + int row; + for (row = 0; row < rowCount; ++row) { for (int column = 0; column < colCount; ++column) { @@ -9413,10 +9414,9 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot bool needsRelay = false; - int row, col; for (row = 0; row < rowCount-1; ++row) // -1 as the bottom row can't rowspan { - for (col = 0; col < colCount; ++col) + for (int col = 0; col < colCount; ++col) { wxRichTextCell* cell = table->GetCell(row, col); if (cell && cell->IsShown()) @@ -9473,7 +9473,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot // There were overflowing rowspanning cells, so layout yet again to make the increased row depths show for (row = 0; row < rowCount; ++row) { - for (col = 0; col < colCount; ++col) + for (int col = 0; col < colCount; ++col) { wxRichTextCell* cell = table->GetCell(row, col); if (cell && cell->IsShown()) -- 2.45.2