void LockBarrierWithKey::Destroy() { _destroyed = true; FreeCell(true); Match3::RunFallColumn(_pos.x); }
PapyShort DeleteLastInList (PapyShort inFileNb, Papy_List **ioListP, int inDelAll, int inDelGroup, int inDelSeq) { Papy_List *theWrk1P, *theWrk2P; PapyShort theErr = 0; if (*ioListP == NULL) return theErr; /* search the last cell of the list */ theWrk1P = *ioListP; theWrk2P = NULL; while (theWrk1P->next != NULL) { theWrk2P = theWrk1P; theWrk1P = theWrk1P->next; } /* while */ if (theWrk2P != NULL) theWrk2P->next = NULL; else *ioListP = NULL; /* free the cell and its content */ theErr = FreeCell (inFileNb, &theWrk1P, inDelAll, inDelGroup, inDelSeq); RETURN (theErr); } /* endof DeleteLastInList */
PapyShort DeleteList (PapyShort inFileNb, Papy_List **ioListP, int inDelAll, int inDelGroup, int inDelSeq) { Papy_List *toFree, *theWrkP; PapyShort theErr = 0; if (*ioListP == NULL) return theErr; /* loop on the elements of the list and frees them begining by the first one */ toFree = *ioListP; while (toFree != NULL) { theWrkP = toFree->next; /* free the cell and its content */ if ((theErr = FreeCell (inFileNb, &toFree, inDelAll, inDelGroup, inDelSeq)) < 0) RETURN (theErr); toFree = theWrkP; } /* while ...loop on the elements of the list */ *ioListP = NULL; RETURN (theErr); } /* endof DeleteList */
PapyShort DeleteFirstInList (PapyShort inFileNb, Papy_List **ioListP, int inDelAll, int inDelGroup, int inDelSeq) { Papy_List *theWrkP; PapyShort theErr = 0; if (*ioListP == NULL) return theErr; /* change the head pointer */ theWrkP = *ioListP; *ioListP = (*ioListP)->next; /* free the cell and its content */ theErr = FreeCell (inFileNb, &theWrkP, inDelAll, inDelGroup, inDelSeq); RETURN (theErr); } /* endof DeleteFirstInList */
void LockBarrierOrder::Destroy() { FreeCell(true); }