fix clang complaints

This commit is contained in:
Jannik 2024-02-25 13:46:49 +01:00
parent 4cc2800a78
commit 9bc8de8876
No known key found for this signature in database
1 changed files with 8 additions and 7 deletions

View File

@ -208,7 +208,7 @@ void Workspaces::doUpdate() {
} }
spdlog::trace("Updating workspace states"); spdlog::trace("Updating workspace states");
auto IPC_workspaces = gIPC->getSocket1JsonReply("workspaces"); auto updated_workspaces = gIPC->getSocket1JsonReply("workspaces");
for (auto &workspace : m_workspaces) { for (auto &workspace : m_workspaces) {
// active // active
workspace->setActive(workspace->name() == m_activeWorkspaceName || workspace->setActive(workspace->name() == m_activeWorkspaceName ||
@ -229,12 +229,13 @@ void Workspaces::doUpdate() {
} }
// update m_output // update m_output
auto IPC_workspace = std::find_if(IPC_workspaces.begin(), IPC_workspaces.end(), [&workspace](auto &w) { auto updated_workspace =
std::find_if(updated_workspaces.begin(), updated_workspaces.end(), [&workspace](auto &w) {
auto wNameRaw = w["name"].asString(); auto wNameRaw = w["name"].asString();
auto wName = wNameRaw.starts_with("special:") ? wNameRaw.substr(8) : wNameRaw; auto wName = wNameRaw.starts_with("special:") ? wNameRaw.substr(8) : wNameRaw;
return wName == workspace->name(); return wName == workspace->name();
}); });
workspace->setOutput((*IPC_workspace)["monitor"].asString()); workspace->setOutput((*updated_workspace)["monitor"].asString());
workspace->update(m_format, workspaceIcon); workspace->update(m_format, workspaceIcon);
} }