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

Method clearStack

Engine/source/util/undo.cpp:225–240  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

223
224//-----------------------------------------------------------------------------
225void UndoManager::clearStack(Vector<UndoAction*> &stack)
226{
227 Vector<UndoAction*>::iterator itr = stack.begin();
228 while (itr != stack.end())
229 {
230 UndoAction* undo = stack.first();
231 stack.pop_front();
232
233 // Call deleteObject() if the action was registered.
234 if ( undo->isProperlyAdded() )
235 undo->deleteObject();
236 else
237 delete undo;
238 }
239 stack.clear();
240}
241
242//-----------------------------------------------------------------------------
243void UndoManager::clampStack(Vector<UndoAction*> &stack)

Callers

nothing calls this directly

Calls 7

isProperlyAddedMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
firstMethod · 0.45
pop_frontMethod · 0.45
deleteObjectMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected