From 9012cebbf2588e3962e2e7c3da8eb47342204d52 Mon Sep 17 00:00:00 2001 From: Viktar Lukashonak Date: Tue, 31 Oct 2023 23:31:58 +0300 Subject: [PATCH] Happy Linter Signed-off-by: Viktar Lukashonak --- include/modules/cava.hpp | 2 +- src/modules/custom.cpp | 2 +- src/modules/hyprland/workspaces.cpp | 4 ++-- src/modules/mpris/mpris.cpp | 10 ++++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/modules/cava.hpp b/include/modules/cava.hpp index 43924db0..430c71b7 100644 --- a/include/modules/cava.hpp +++ b/include/modules/cava.hpp @@ -7,7 +7,7 @@ namespace cava { extern "C" { #include } -} +} // namespace cava namespace waybar::modules { using namespace std::literals::chrono_literals; diff --git a/src/modules/custom.cpp b/src/modules/custom.cpp index 3a3e0169..fa03c3be 100644 --- a/src/modules/custom.cpp +++ b/src/modules/custom.cpp @@ -197,7 +197,7 @@ void waybar::modules::Custom::parseOutputRaw() { int i = 0; while (getline(output, line)) { Glib::ustring validated_line = line; - if(!validated_line.validate()) { + if (!validated_line.validate()) { validated_line = validated_line.make_valid(); } diff --git a/src/modules/hyprland/workspaces.cpp b/src/modules/hyprland/workspaces.cpp index 62383f46..e2b3da50 100644 --- a/src/modules/hyprland/workspaces.cpp +++ b/src/modules/hyprland/workspaces.cpp @@ -153,7 +153,7 @@ auto Workspaces::register_ipc() -> void { } auto Workspaces::update() -> void { - //remove workspaces that wait to be removed + // remove workspaces that wait to be removed unsigned int current_remove_workspace_num = 0; for (const std::string &workspace_to_remove : workspaces_to_remove_) { remove_workspace(workspace_to_remove); @@ -163,7 +163,7 @@ auto Workspaces::update() -> void { workspaces_to_remove_.erase(workspaces_to_remove_.begin()); } - //add workspaces that wait to be created + // add workspaces that wait to be created unsigned int current_create_workspace_num = 0; for (Json::Value const &workspace_to_create : workspaces_to_create_) { create_workspace(workspace_to_create); diff --git a/src/modules/mpris/mpris.cpp b/src/modules/mpris/mpris.cpp index cd69c336..eea9a82b 100644 --- a/src/modules/mpris/mpris.cpp +++ b/src/modules/mpris/mpris.cpp @@ -575,10 +575,12 @@ auto Mpris::getPlayerInfo() -> std::optional { errorexit: std::string errorMsg = error->message; - // When mpris checks for active player sessions periodically(5 secs), NoActivePlayer error message is - // thrown when there are no active sessions. This error message is spamming logs without having any value - // addition. Log the error only if the error we recceived is not NoActivePlayer. - if(errorMsg.rfind("GDBus.Error:com.github.altdesktop.playerctld.NoActivePlayer") == std::string::npos){ + // When mpris checks for active player sessions periodically(5 secs), NoActivePlayer error + // message is + // thrown when there are no active sessions. This error message is spamming logs without having + // any value addition. Log the error only if the error we recceived is not NoActivePlayer. + if (errorMsg.rfind("GDBus.Error:com.github.altdesktop.playerctld.NoActivePlayer") == + std::string::npos) { spdlog::error("mpris[{}]: {}", info.name, error->message); } return std::nullopt;