MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / clampStack

Method clampStack

Engine/source/util/undo.cpp:241–254  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

239
240//-----------------------------------------------------------------------------
241void UndoManager::clampStack(Vector<UndoAction*> &stack)
242{
243 while(stack.size() > mNumLevels)
244 {
245 UndoAction *act = stack.front();
246 stack.pop_front();
247
248 // Call deleteObject() if the action was registered.
249 if ( act->isProperlyAdded() )
250 act->deleteObject();
251 else
252 delete act;
253 }
254}
255
256void UndoManager::removeAction(UndoAction *action, bool noDelete)
257{

Callers

nothing calls this directly

Calls 5

isProperlyAddedMethod · 0.80
sizeMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45
deleteObjectMethod · 0.45

Tested by

no test coverage detected