Skip to content

Commit

Permalink
wlr/taskbar: fix some build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertMueller2 committed Sep 13, 2024
1 parent c9f6c6e commit 838059a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/modules/wlr/taskbar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Taskbar : public waybar::AModule {
public:
Taskbar(const std::string &, const waybar::Bar &, const Json::Value &);
~Taskbar();
void update();
auto update() -> void override;
auto doAction(const std::string &) -> void override;

private:
Expand Down
9 changes: 4 additions & 5 deletions src/modules/wlr/taskbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,7 @@ Taskbar::Taskbar(const std::string &id, const waybar::Bar &bar, const Json::Valu
actions.end()) {
task_actions_.emplace(t, config["actions"][t].asString());
} else {
spdlog::warn(
std::format("wlr/taskbar: unknown action {}", config["actions"][t].asString()));
spdlog::warn("wlr/taskbar: unknown action {}", config["actions"][t].asString());
}
}

Expand All @@ -833,11 +832,11 @@ Taskbar::Taskbar(const std::string &id, const waybar::Bar &bar, const Json::Valu
if (config_[t].isString() &&
std::find(actions.begin(), actions.end(), config_[t].asString()) != actions.end()) {
if (task_actions_.emplace(t, config_[t].asString()).second) {
spdlog::warn(std::format("wlr/taskbar: {} action should be within actions object", t));
spdlog::warn("wlr/taskbar: {} action should be within actions object", t);
} else {
spdlog::warn(std::format(
spdlog::warn(
"wlr/taskbar: ignoring action {} because there is another within the actions object",
t));
t);
}
}
}
Expand Down

0 comments on commit 838059a

Please sign in to comment.