- Removed "isClone" flag. This flag was error prone. The "core" classes now have decent copy constructors, and ideally long term we should create copy constructors for the abilities that have additional pointers in them.
-- The test suite passes but this is a big change. I might have introduced some memory leaks or bugs. I might have fixed some bugs, too
This commit is contained in:
@@ -14,15 +14,22 @@ ActionElement::ActionElement(int id) :
|
||||
currentPhase = -1;
|
||||
newPhase = -1;
|
||||
tc = NULL;
|
||||
isClone = 0;
|
||||
}
|
||||
|
||||
ActionElement::ActionElement(const ActionElement& a): JGuiObject(a)
|
||||
{
|
||||
activeState = a.activeState;
|
||||
tc = a.tc ? a.tc->clone() : NULL;
|
||||
currentPhase = a.currentPhase;
|
||||
newPhase = a.newPhase;
|
||||
modal = a.modal;
|
||||
waitingForAnswer = a.waitingForAnswer;
|
||||
}
|
||||
|
||||
ActionElement::~ActionElement()
|
||||
{
|
||||
if (!isClone)
|
||||
{
|
||||
SAFE_DELETE(tc);
|
||||
}
|
||||
SAFE_DELETE(tc);
|
||||
|
||||
}
|
||||
|
||||
int ActionElement::getActivity()
|
||||
|
||||
Reference in New Issue
Block a user