From bcaaa96ab088d75f702ecd8d876f13fec9ea75ff Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 5 Jan 2016 23:04:01 -0500 Subject: [PATCH] Color: Made more methods and args const --- src/common/Color.cpp | 4 ++-- src/common/Color.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/Color.cpp b/src/common/Color.cpp index 54629397..433391f3 100644 --- a/src/common/Color.cpp +++ b/src/common/Color.cpp @@ -416,7 +416,7 @@ void Color::upgrade () } //////////////////////////////////////////////////////////////////////////////// -std::string Color::colorize (const std::string& input) +std::string Color::colorize (const std::string& input) const { std::string result; _colorize (result, input); @@ -435,7 +435,7 @@ std::string Color::colorize (const std::string& input) // // 256 fg \033[38;5;Nm // 256 bg \033[48;5;Nm -void Color::_colorize (std::string &result, const std::string& input) +void Color::_colorize (std::string &result, const std::string& input) const { if (!nontrivial ()) { diff --git a/src/common/Color.h b/src/common/Color.h index e8db5100..2185ea4b 100644 --- a/src/common/Color.h +++ b/src/common/Color.h @@ -58,9 +58,9 @@ public: void upgrade (); void blend (const Color&); - std::string colorize (const std::string&); + std::string colorize (const std::string&) const; static std::string colorize (const std::string&, const std::string&); - void _colorize (std::string&, const std::string&); + void _colorize (std::string&, const std::string&) const; static std::string strip (const std::string&); bool nontrivial () const;