| 88 | } |
| 89 | |
| 90 | std::unique_ptr<MICommand> CommandQueue::nextCommand() |
| 91 | { |
| 92 | if (m_commandList.empty()) |
| 93 | return {}; |
| 94 | |
| 95 | auto command = std::exchange(m_commandList.front(), {}); |
| 96 | m_commandList.pop_front(); |
| 97 | |
| 98 | if (command->flags() & (CmdImmediately | CmdInterrupt)) |
| 99 | --m_immediatelyCounter; |
| 100 | |
| 101 | return command; |
| 102 | } |
| 103 |