diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:53:10 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:53:10 +0100 |
commit | cd654451c91088a1be8179e96865cf2aa0ea7624 (patch) | |
tree | bb90baa30bf48f1019e4b713d849eee2d3a05c50 /src/libutil/fmt.hh | |
parent | 43cedec6c535971d6c1cc86b009187ff742d505f (diff) |
Merge pull request #9924 from 9999years/rename-yellowtxt
Rename `yellowtxt` -> `magentatxt`
(cherry picked from commit fb78a99e04206e7b1df84a362bb87d3300b41855)
Change-Id: I9ade553d9f499e6713aeff3463c9a653a880a051
Diffstat (limited to 'src/libutil/fmt.hh')
-rw-r--r-- | src/libutil/fmt.hh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh index 727255b45..f552a6b77 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/fmt.hh @@ -58,19 +58,17 @@ inline std::string fmt(const std::string & fs, const Args & ... args) return f.str(); } -// ----------------------------------------------------------------------------- // format function for hints in errors. same as fmt, except templated values -// are always in yellow. - +// are always in magenta. template <class T> -struct yellowtxt +struct magentatxt { - yellowtxt(const T &s) : value(s) {} + magentatxt(const T &s) : value(s) {} const T & value; }; template <class T> -std::ostream & operator<<(std::ostream & out, const yellowtxt<T> & y) +std::ostream & operator<<(std::ostream & out, const magentatxt<T> & y) { return out << ANSI_WARNING << y.value << ANSI_NORMAL; } @@ -109,7 +107,7 @@ public: template<class T> hintformat & operator%(const T & value) { - fmt % yellowtxt(value); + fmt % magentatxt(value); return *this; } |