fixed memory leak in double tap gesture

fixed some compiler warnings
removed dead and useless code
This commit is contained in:
techdragon.nguyen@gmail.com
2011-10-08 00:56:07 +00:00
parent 9f09bbeec3
commit fbe2e44814
14 changed files with 53 additions and 51 deletions
+5 -2
View File
@@ -35,9 +35,12 @@ int ActionLayer::removeFromGame(ActionElement * e)
if (i == -1)
return 0; //Should not happen, it means we deleted thesame object twice?
AbilityFactory af(observer);
if(dynamic_cast<MTGAbility*>(e))
MTGAbility * a = dynamic_cast<MTGAbility*>(e);
if (a != NULL)
{
AManaProducer * manaObject = dynamic_cast<AManaProducer*>(af.getCoreAbility((MTGAbility*)e));
AManaProducer * manaObject = dynamic_cast<AManaProducer*>(af.getCoreAbility(a));
if(manaObject)
{
for (size_t i = 0; i < manaObjects.size(); i++)