fix: lint

This commit is contained in:
Alex 2022-10-18 09:01:45 +02:00
parent 209225e381
commit 6e73c58e60
2 changed files with 4 additions and 5 deletions

View File

@ -73,9 +73,9 @@
#include "modules/jack.hpp"
#endif
#include "bar.hpp"
#include "modules/user.hpp"
#include "modules/custom.hpp"
#include "modules/temperature.hpp"
#include "modules/user.hpp"
namespace waybar {

View File

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