projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document wxDropTarget::GetDataObject().
[wxWidgets.git]
/
demos
/
life
/
game.cpp
diff --git
a/demos/life/game.cpp
b/demos/life/game.cpp
index 119b06bb3cdf7e5574511046001e1f955aae9d18..eefae2c2de69b581b3ea5ec35f2a552c15d95df9 100644
(file)
--- a/
demos/life/game.cpp
+++ b/
demos/life/game.cpp
@@
-13,10
+13,6
@@
// headers, declarations, constants
// ==========================================================================
// headers, declarations, constants
// ==========================================================================
-#ifdef __GNUG__
- #pragma implementation "game.h"
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
@@
-35,7
+31,7
@@
#include <string.h> // for memset
#include <string.h> // for memset
-#define ARRAYSIZE 1024 // static array for BeginFind & co.
+#define
CELLS
ARRAYSIZE 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
#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_boxes[i] = NULL;
// state vars for BeginFind & FindMore
- m_cells = new LifeCell[ARRAYSIZE];
+ m_cells = new LifeCell[
CELLS
ARRAYSIZE];
m_ncells = 0;
m_findmore = false;
m_changed = false;
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
continue;
// check whether there is enough space left in the array
- if (m_ncells > (ARRAYSIZE - 64))
+ if (m_ncells > (
CELLS
ARRAYSIZE - 64))
{
*ncells = m_ncells;
return false;
{
*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
continue;
// check whether there is enough space left in the array
- if (m_ncells > (ARRAYSIZE - 64))
+ if (m_ncells > (
CELLS
ARRAYSIZE - 64))
{
*ncells = m_ncells;
return false;
{
*ncells = m_ncells;
return false;