Adding break when sorted_workspaces is filled
This commit is contained in:
parent
8ba3052dd1
commit
863e0babd8
|
@ -99,6 +99,9 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
|
||||||
if (it != ws_end) {
|
if (it != ws_end) {
|
||||||
sorted_workspaces.emplace_back(*it);
|
sorted_workspaces.emplace_back(*it);
|
||||||
--ws_end;
|
--ws_end;
|
||||||
|
if (ws_end == workspaces_.begin()) { // we've extracted everything
|
||||||
|
break;
|
||||||
|
}
|
||||||
ws_end->swap(*it);
|
ws_end->swap(*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue