indentlog: refactor: color_spec arg to function_name_impl<>

This commit is contained in:
Roland Conybeare 2023-09-18 12:39:55 -04:00
commit 921da6aac6
2 changed files with 4 additions and 4 deletions

View file

@ -26,12 +26,12 @@ namespace xo {
* 31 = red
*/
function_name_impl(function_style style,
color_encoding encoding,
std::uint32_t color,
color_spec spec,
std::string_view pretty)
: style_{style}, color_spec_(encoding, color), pretty_{pretty} {}
: style_{style}, color_spec_{spec}, pretty_{pretty} {}
function_style style() const { return style_; }
color_spec const & spec() const { return color_spec_; }
color_encoding encoding() const { return color_spec_.encoding(); }
std::uint32_t color() const { return color_spec_.code(); }
std::string_view const & pretty() const { return pretty_; }

View file

@ -233,7 +233,7 @@ namespace xo {
this->ss_ << ' ';
/* scope name - note no trailing newline; expect .preamble()/.postamble() caller to supply */
this->ss_ << function_name(style, encoding, fn_color, name1) << name2;
this->ss_ << function_name(style, color_spec(encoding, fn_color), name1) << name2;
} /*entryexit_aux*/
template <typename CharT, typename Traits>