MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / PopQueueItem

Method PopQueueItem

src/Windows/QueueWindow.cpp:99–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99int QueueWindow::PopQueueItem(QueueOperation * op) {
100 if (!ValidType(op->GetType()))
101 return -1;
102
103 int index = GetNrItems()-1;
104 if (index == -1)
105 return -1;
106
107 LVITEM lvi;
108 lvi.iItem = 0;
109 lvi.iSubItem = 0;
110 lvi.mask = LVIF_PARAM;
111 BOOL res = ListView_GetItem(m_hwnd, &lvi);
112 if (res == FALSE)
113 return -1;
114
115 if ((QueueOperation*)lvi.lParam != op)
116 return -1;
117
118 res = ListView_DeleteItem(m_hwnd,index);
119 if (res == FALSE)
120 return -1;
121
122 return 0;
123}
124
125int QueueWindow::RemoveQueueItem(QueueOperation * op) {
126 if (!ValidType(op->GetType()))

Callers

nothing calls this directly

Calls 1

GetTypeMethod · 0.45

Tested by

no test coverage detected