summaryrefslogtreecommitdiff
path: root/win/terrctrl.cpp
diff options
context:
space:
mode:
authorLeo2009-02-22 03:39:40 +0000
committerLeo2009-02-22 03:39:40 +0000
commit27815f2cce37721ae1c524669c3e19cff8a50894 (patch)
tree87d40bc85de59359864bd9048f8b67b1d8ee9c9f /win/terrctrl.cpp
parenta8ad39466b19601b4284c2f4e6afa68eccb91b62 (diff)
Fixes for VS 2005.
git-svn-id: http://svn.leocad.org/tags/leocad-0.75@741 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/terrctrl.cpp')
-rw-r--r--win/terrctrl.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/win/terrctrl.cpp b/win/terrctrl.cpp
index 853138f..284d8db 100644
--- a/win/terrctrl.cpp
+++ b/win/terrctrl.cpp
@@ -511,7 +511,9 @@ void CTerrainCtrl::OnDraw(CDC* pDC)
*/
// calc bottom
int bottom = GetFixedRowHeight();
- for (int i = idTopLeft.row; i < m_nRows; i++)
+ int i;
+
+ for (i = idTopLeft.row; i < m_nRows; i++)
{
bottom += GetRowHeight(i);
if (bottom >= clientRect.bottom)
@@ -1293,7 +1295,9 @@ CELLID CTerrainCtrl::GetCellFromPt(CPoint point, BOOL bAllowFixedCellCheck)
else if (point.x < fixedColWidth) // in fixed col
{
int xpos = 0;
- for (int col = 0; col < m_nFixedCols; col++)
+ int col;
+
+ for (col = 0; col < m_nFixedCols; col++)
{
xpos += GetColumnWidth(col);
if (xpos > point.x) break;
@@ -1303,7 +1307,9 @@ CELLID CTerrainCtrl::GetCellFromPt(CPoint point, BOOL bAllowFixedCellCheck)
else // in non-fixed col
{
int xpos = fixedColWidth;
- for (int col = idTopLeft.col; col < m_nCols; col++)
+ int col;
+
+ for (col = idTopLeft.col; col < m_nCols; col++)
{
xpos += GetColumnWidth(col);
if (xpos > point.x) break;
@@ -1322,7 +1328,9 @@ CELLID CTerrainCtrl::GetCellFromPt(CPoint point, BOOL bAllowFixedCellCheck)
else if (point.y < fixedRowHeight) // in fixed col
{
int ypos = 0;
- for (int row = 0; row < m_nFixedRows; row++)
+ int row;
+
+ for (row = 0; row < m_nFixedRows; row++)
{
ypos += GetRowHeight(row);
if (ypos > point.y) break;
@@ -1332,7 +1340,9 @@ CELLID CTerrainCtrl::GetCellFromPt(CPoint point, BOOL bAllowFixedCellCheck)
else
{
int ypos = fixedRowHeight;
- for (int row = idTopLeft.row; row < GetRowCount(); row++)
+ int row;
+
+ for (row = idTopLeft.row; row < GetRowCount(); row++)
{
ypos += GetRowHeight(row);
if (ypos > point.y) break;
@@ -1792,7 +1802,9 @@ void CTerrainCtrl::EnsureVisible(int nRow, int nCol)
// calc bottom
int bottom = GetFixedRowHeight();
- for (int i = idTopLeft.row; i < m_nRows; i++)
+ int i;
+
+ for (i = idTopLeft.row; i < m_nRows; i++)
{
bottom += GetRowHeight(i);
if (bottom >= rect.bottom)