From 8db94f7efda7ed305fb54f2e0a0cb7f0a63803a0 Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 22 Nov 2018 16:50:42 +0100 Subject: [PATCH] revert(ALabel): ref on format --- include/ALabel.hpp | 4 ++-- src/ALabel.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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_)