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

Method clearStack

Engine/source/util/undo.cpp:223–238  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected