diff --git a/include/bar.hpp b/include/bar.hpp index 96f92608..bdd9124a 100644 --- a/include/bar.hpp +++ b/include/bar.hpp @@ -20,7 +20,7 @@ struct Font std::string id; int offset; - Font(const std::string& id, int offset) + Font(std::string id, int offset) : id(id), offset(offset){} }; diff --git a/include/drawtypes/animation.hpp b/include/drawtypes/animation.hpp index 1ddffff2..a003fdb2 100644 --- a/include/drawtypes/animation.hpp +++ b/include/drawtypes/animation.hpp @@ -34,5 +34,5 @@ namespace drawtypes } }; - std::unique_ptr get_config_animation(const std::string& config_path, const std::string& animation_name = "animation", bool required = true); + std::unique_ptr get_config_animation(std::string config_path, std::string animation_name = "animation", bool required = true); } diff --git a/include/drawtypes/bar.hpp b/include/drawtypes/bar.hpp index 1a9379aa..220401f3 100644 --- a/include/drawtypes/bar.hpp +++ b/include/drawtypes/bar.hpp @@ -24,7 +24,7 @@ namespace drawtypes std::unique_ptr indicator; public: - Bar(int width, const std::string& fmt, bool lazy_builder_closing = true); + Bar(int width, std::string fmt, bool lazy_builder_closing = true); Bar(int width, bool lazy_builder_closing = true) : Bar(width, "", lazy_builder_closing){} @@ -38,5 +38,5 @@ namespace drawtypes std::string get_output(float percentage, bool floor_percentage = false); }; - std::unique_ptr get_config_bar(const std::string& config_path, const std::string& bar_name = "bar", bool lazy_builder_closing = true); + std::unique_ptr get_config_bar(std::string config_path, std::string bar_name = "bar", bool lazy_builder_closing = true); } diff --git a/include/drawtypes/icon.hpp b/include/drawtypes/icon.hpp index 85304cbc..412986de 100644 --- a/include/drawtypes/icon.hpp +++ b/include/drawtypes/icon.hpp @@ -11,9 +11,9 @@ namespace drawtypes { struct Icon : public Label { - Icon(const std::string& icon, int font = 0) + Icon(std::string icon, int font = 0) : Label(icon, font){} - Icon(const std::string& icon, const std::string& fg, const std::string& bg = "", const std::string& ul = "", const std::string& ol = "", int font = 0, int padding = 0, int margin = 0) + Icon(std::string icon, std::string fg, std::string bg = "", std::string ul = "", std::string ol = "", int font = 0, int padding = 0, int margin = 0) : Label(icon, fg, bg, ul, ol, font, padding, margin){} std::unique_ptr clone(); @@ -24,15 +24,15 @@ namespace drawtypes std::map> icons; public: - void add(const std::string& id, std::unique_ptr &&icon); - std::unique_ptr &get(const std::string& id, const std::string& fallback_id = ""); - bool has(const std::string& id); + void add(std::string id, std::unique_ptr &&icon); + std::unique_ptr &get(std::string id, std::string fallback_id = ""); + bool has(std::string id); operator bool() { return this->icons.size() > 0; } }; - std::unique_ptr get_config_icon(const std::string& module_name, const std::string& icon_name = "icon", bool required = true, const std::string& def = ""); - std::unique_ptr get_optional_config_icon(const std::string& module_name, const std::string& icon_name = "icon", const std::string& def = ""); + std::unique_ptr get_config_icon(std::string module_name, std::string icon_name = "icon", bool required = true, std::string def = ""); + std::unique_ptr get_optional_config_icon(std::string module_name, std::string icon_name = "icon", std::string def = ""); } diff --git a/include/drawtypes/label.hpp b/include/drawtypes/label.hpp index 52cd8b7c..9825e43a 100644 --- a/include/drawtypes/label.hpp +++ b/include/drawtypes/label.hpp @@ -10,9 +10,9 @@ namespace drawtypes std::string text, fg, bg, ul, ol; int font = 0, padding = 0, margin = 0; - Label(const std::string& text, int font) + Label(std::string text, int font) : text(text), font(font){} - Label(const std::string& text, const std::string& fg = "", const std::string& bg = "", const std::string& ul = "", const std::string& ol = "", int font = 0, int padding = 0, int margin = 0) + Label(std::string text, std::string fg = "", std::string bg = "", std::string ul = "", std::string ol = "", int font = 0, int padding = 0, int margin = 0) : text(text), fg(fg), bg(bg), ul(ul), ol(ol), font(font), padding(padding), margin(margin){} operator bool() { @@ -21,10 +21,10 @@ namespace drawtypes std::unique_ptr