MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / removeMessagesForTimer

Method removeMessagesForTimer

src/ui/manager.cpp:934–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934void Manager::removeMessagesForTimer(Timer* timer)
935{
936 for (auto it=msg_queue.begin(); it != msg_queue.end(); ) {
937 Message* msg = *it;
938
939 if (!msg->isUsed() &&
940 msg->type() == kTimerMessage &&
941 static_cast<TimerMessage*>(msg)->timer() == timer) {
942 delete msg;
943 it = msg_queue.erase(it);
944 }
945 else
946 ++it;
947 }
948}
949
950void Manager::removeMessageListener(Widget* widget) {
951 auto it = std::find(m_messageListeners.begin(), m_messageListeners.end(), widget);

Callers 1

~TimerMethod · 0.80

Calls 5

isUsedMethod · 0.80
timerMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected