From c160361dcf42a2dbbcbdf8873e51eec6d316f5a5 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Sun, 21 May 2000 10:45:29 +0000 Subject: [PATCH] Cleaned up some unix compilation problems due to for loops declaring a variable in the for statement git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/db.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/common/db.cpp b/src/common/db.cpp index 6d75da2172..72d2d276eb 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -1959,7 +1959,8 @@ wxDbColInf *wxDb::GetColumns(char *tableName[], const char* WXUNUSED(userID)) _TableColumns *TableColumns = new _TableColumns[tbl]; // Fill the table - for (int i = 0 ; i < tbl ; i++) + int i; + for (i = 0 ; i < tbl ; i++) { TableColumns[i].colInf = GetColumns(tableName[i], &TableColumns[i].noCols); if (TableColumns[i].colInf == NULL) return NULL; @@ -1976,13 +1977,14 @@ wxDbColInf *wxDb::GetColumns(char *tableName[], const char* WXUNUSED(userID)) // Merge ... int offset = 0; - for (int i = 0 ; i < tbl ; i++) - { - for (int j = 0 ; j < TableColumns[i].noCols ; j++) - { - colInf[offset++] = TableColumns[i].colInf[j]; - } - } + int j; + for (i = 0 ; i < tbl ; i++) + { + for (j = 0 ; j < TableColumns[i].noCols ; j++) + { + colInf[offset++] = TableColumns[i].colInf[j]; + } + } delete [] TableColumns; return colInf;