X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d2ac6b8c652a4aac703ba03f143820e978b33d4..4e1e8dc51b8c6f3e56c57b67b0f49ba6c46eded2:/demos/life/game.cpp diff --git a/demos/life/game.cpp b/demos/life/game.cpp index 119b06bb3c..eefae2c2de 100644 --- a/demos/life/game.cpp +++ b/demos/life/game.cpp @@ -13,10 +13,6 @@ // headers, declarations, constants // ========================================================================== -#ifdef __GNUG__ - #pragma implementation "game.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -35,7 +31,7 @@ #include // for memset -#define ARRAYSIZE 1024 // static array for BeginFind & co. +#define CELLSARRAYSIZE 1024 // static array for BeginFind & co. #define ALLOCBOXES 16 // number of cellboxes to alloc at once #define MAXDEAD 8 // tics before removing cellbox from list @@ -127,7 +123,7 @@ Life::Life() m_boxes[i] = NULL; // state vars for BeginFind & FindMore - m_cells = new LifeCell[ARRAYSIZE]; + m_cells = new LifeCell[CELLSARRAYSIZE]; m_ncells = 0; m_findmore = false; m_changed = false; @@ -528,7 +524,7 @@ bool Life::FindMore(LifeCell *cells[], size_t *ncells) continue; // check whether there is enough space left in the array - if (m_ncells > (ARRAYSIZE - 64)) + if (m_ncells > (CELLSARRAYSIZE - 64)) { *ncells = m_ncells; return false; @@ -553,7 +549,7 @@ bool Life::FindMore(LifeCell *cells[], size_t *ncells) continue; // check whether there is enough space left in the array - if (m_ncells > (ARRAYSIZE - 64)) + if (m_ncells > (CELLSARRAYSIZE - 64)) { *ncells = m_ncells; return false;