-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUndo.cpp
More file actions
43 lines (38 loc) · 858 Bytes
/
Undo.cpp
File metadata and controls
43 lines (38 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Undo.cpp: implementation of the CUndo class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "AnMap.h"
#include "Undo.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CUndo::CUndo()
{
for( int i=0 ; i<DEF_MAX_MEMTILE ; i++ )
{
m_pUndoTile[i] = NULL;
m_pRedoTile[i] = NULL;
}
}
CUndo::~CUndo()
{
for( int i=0 ; i<DEF_MAX_MEMTILE ; i++ )
{
if( m_pUndoTile[i] != NULL )
{
delete m_pUndoTile[i];
m_pUndoTile[i] = NULL;
}
if( m_pRedoTile[i] != NULL )
{
delete m_pRedoTile[i];
m_pRedoTile[i] = NULL;
}
}
}