Fix linter error (formatting)

pull/1721/head
herlev 2022-10-17 10:13:37 +02:00
parent 4dfea72db0
commit 33c3ab35a8
1 changed files with 3 additions and 4 deletions

View File

@ -45,9 +45,8 @@ uint Window::getActiveWorkspaceID(std::string monitorName) {
assert(cmd.exit_code == 0); assert(cmd.exit_code == 0);
Json::Value json = parser_.parse(cmd.out); Json::Value json = parser_.parse(cmd.out);
assert(json.isArray()); assert(json.isArray());
auto monitor = std::find_if(json.begin(), json.end(), [&](Json::Value monitor){ auto monitor = std::find_if(json.begin(), json.end(),
return monitor["name"] == monitorName; [&](Json::Value monitor) { return monitor["name"] == monitorName; });
});
assert(monitor != std::end(json)); assert(monitor != std::end(json));
return (*monitor)["activeWorkspace"]["id"].as<uint>(); return (*monitor)["activeWorkspace"]["id"].as<uint>();
} }
@ -57,7 +56,7 @@ std::string Window::getLastWindowTitle(uint workspaceID) {
assert(cmd.exit_code == 0); assert(cmd.exit_code == 0);
Json::Value json = parser_.parse(cmd.out); Json::Value json = parser_.parse(cmd.out);
assert(json.isArray()); assert(json.isArray());
auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace){ auto workspace = std::find_if(json.begin(), json.end(), [&](Json::Value workspace) {
return workspace["id"].as<uint>() == workspaceID; return workspace["id"].as<uint>() == workspaceID;
}); });
assert(workspace != std::end(json)); assert(workspace != std::end(json));