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

Method clampStack

Engine/source/util/undo.cpp:243–256  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

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