diff --git a/include/ALabel.hpp b/include/ALabel.hpp index 74582cf1..00daf3c8 100644 --- a/include/ALabel.hpp +++ b/include/ALabel.hpp @@ -7,7 +7,7 @@ namespace waybar { class ALabel : public IModule { public: - ALabel(const Json::Value&, const std::string& format); + ALabel(const Json::Value&, const std::string format); virtual ~ALabel() = default; virtual auto update() -> void; virtual std::string getIcon(uint16_t, const std::string& alt = ""); @@ -24,7 +24,7 @@ class ALabel : public IModule { bool handleToggle(GdkEventButton* const& ev); bool handleScroll(GdkEventScroll*); bool alt = false; - const std::string& default_format_; + const std::string default_format_; }; } // namespace waybar diff --git a/src/ALabel.cpp b/src/ALabel.cpp index a8d7b276..9dd590e5 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -3,7 +3,7 @@ #include -waybar::ALabel::ALabel(const Json::Value& config, const std::string& format) +waybar::ALabel::ALabel(const Json::Value& config, const std::string format) : config_(config), format_(config_["format"].isString() ? config_["format"].asString() : format), default_format_(format_)