MCPcopy Create free account
hub / github.com/KDE/kdevelop / rationalizeQueue

Method rationalizeQueue

plugins/debuggercommon/mi/micommandqueue.cpp:47–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void CommandQueue::rationalizeQueue(MICommand* command)
48{
49 if ((command->type() >= ExecAbort && command->type() <= ExecUntil) &&
50 command->type() != ExecArguments ) {
51 // Changing execution location, abort any variable updates and stack list updates
52
53 auto predicate = [this](const auto& command) {
54 const auto type = command->type();
55 const auto isVariableUpdate
56 = (type >= VarEvaluateExpression && type <= VarListChildren) || type == VarUpdate;
57 const auto isStackListUpdate = type >= StackListArguments && type <= StackListLocals;
58 if (isVariableUpdate || isStackListUpdate) {
59 if (command->flags() & (CmdImmediately | CmdInterrupt))
60 --m_immediatelyCounter;
61 return true;
62 }
63 return false;
64 };
65 m_commandList.erase(std::remove_if(m_commandList.begin(), m_commandList.end(), predicate), m_commandList.end());
66 }
67}
68
69void CommandQueue::clear()
70{

Callers

nothing calls this directly

Calls 4

typeMethod · 0.45
flagsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected