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 Jul 10, 2024
1 parent a903693 commit cf2453e
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 @@ -139,7 +139,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 @@ -806,8 +806,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 @@ -817,11 +816,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 cf2453e

Please sign in to comment.