From a9015c7c98cfc03fe462155783eac7d032eb743e Mon Sep 17 00:00:00 2001 From: John Maximilian <2e0byo@gmail.com> Date: Wed, 8 Mar 2023 14:31:53 +0000 Subject: [PATCH] refactor: make linter happy. --- src/modules/mpd/mpd.cpp | 5 ++--- src/modules/wireplumber.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/mpd/mpd.cpp b/src/modules/mpd/mpd.cpp index 008462a..73062c7 100644 --- a/src/modules/mpd/mpd.cpp +++ b/src/modules/mpd/mpd.cpp @@ -123,9 +123,8 @@ void waybar::modules::MPD::setLabel() { std::string stateIcon = ""; bool no_song = song_.get() == nullptr; - if (stopped() || no_song ) { - if (no_song) - spdlog::warn("Bug in mpd: no current song but state is not stopped."); + if (stopped() || no_song) { + if (no_song) spdlog::warn("Bug in mpd: no current song but state is not stopped."); format = config_["format-stopped"].isString() ? config_["format-stopped"].asString() : "stopped"; label_.get_style_context()->add_class("stopped"); diff --git a/src/modules/wireplumber.cpp b/src/modules/wireplumber.cpp index 150acb4..7d9689c 100644 --- a/src/modules/wireplumber.cpp +++ b/src/modules/wireplumber.cpp @@ -173,7 +173,7 @@ void waybar::modules::Wireplumber::onDefaultNodesApiChanged(waybar::modules::Wir spdlog::debug( "[{}]: (onDefaultNodesApiChanged) - Default node changed to -> Node(name: {}, id: {})", self->name_, default_node_name, default_node_id); - + g_free(self->default_node_name_); self->default_node_name_ = g_strdup(default_node_name); updateVolume(self, default_node_id);