fixed a compilation error for VC++ 6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -824,6 +824,7 @@ void Life::SetCell(int x, int y, bool alive)
|
||||
bool Life::NextTic()
|
||||
{
|
||||
long changed = 0;
|
||||
int i, j;
|
||||
|
||||
/* 1st pass. Find and mark deaths and births for this generation.
|
||||
*
|
||||
@@ -832,8 +833,8 @@ bool Life::NextTic()
|
||||
* An organism with >= 4 neighbors will die due to starvation.
|
||||
* New organisms are born in cells with exactly 3 neighbors.
|
||||
*/
|
||||
for (int j = 0; j < m_height; j++)
|
||||
for (int i = 0; i < m_width; i++)
|
||||
for (j = 0; j < m_height; j++)
|
||||
for (i = 0; i < m_width; i++)
|
||||
{
|
||||
int neighbors = GetNeighbors(i, j);
|
||||
bool alive = IsAlive(i, j);
|
||||
@@ -852,8 +853,8 @@ bool Life::NextTic()
|
||||
|
||||
/* 2nd pass. Stabilize.
|
||||
*/
|
||||
for (int j = 0; j < m_height; j++)
|
||||
for (int i = 0; i < m_width; i++)
|
||||
for (j = 0; j < m_height; j++)
|
||||
for (i = 0; i < m_width; i++)
|
||||
{
|
||||
/* Toggle CELL_ALIVE for those cells marked in the
|
||||
* previous pass. Do not clear the CELL_MARK bit yet;
|
||||
|
Reference in New Issue
Block a user