diff --git a/include/indentlog/code_location.hpp b/include/indentlog/code_location.hpp index e343fb58..e0460225 100644 --- a/include/indentlog/code_location.hpp +++ b/include/indentlog/code_location.hpp @@ -25,7 +25,7 @@ namespace xo { void print_code_location(std::ostream & os) const { os << "[" - << with_color(encoding_, color_, basename(file_)) + << with_color(color_spec(encoding_, color_), basename(file_)) << ":" << line_ << "]"; diff --git a/include/indentlog/color.hpp b/include/indentlog/color.hpp index 508507ed..37e0b072 100644 --- a/include/indentlog/color.hpp +++ b/include/indentlog/color.hpp @@ -154,8 +154,8 @@ namespace xo { } /*with_ansi_color*/ template - color_impl with_color(color_encoding encoding, std::uint32_t color, Contents && contents) { - return color_impl(CF_All, color_spec(encoding, color), std::forward(contents)); + color_impl with_color(color_spec spec, Contents && contents) { + return color_impl(CF_All, spec, std::forward(contents)); } /*with_color*/ inline color_impl diff --git a/include/indentlog/function.hpp b/include/indentlog/function.hpp index 57c2c1da..4b44c2a8 100644 --- a/include/indentlog/function.hpp +++ b/include/indentlog/function.hpp @@ -250,10 +250,10 @@ namespace xo { switch(fn.style()) { case FS_Literal: - os << with_color(fn.encoding(), fn.color(), fn.pretty()); + os << with_color(color_spec(fn.encoding(), fn.color()), fn.pretty()); break; case FS_Pretty: - os << "[" << with_color(fn.encoding(), fn.color(), fn.pretty()) << "]"; + os << "[" << with_color(color_spec(fn.encoding(), fn.color()), fn.pretty()) << "]"; break; case FS_Simple: os << color_on(fn.encoding(), fn.color()); diff --git a/include/indentlog/log_state.hpp b/include/indentlog/log_state.hpp index 01566380..814bf070 100644 --- a/include/indentlog/log_state.hpp +++ b/include/indentlog/log_state.hpp @@ -223,8 +223,8 @@ namespace xo { */ this->ss_ << "(" - << with_color(log_config::encoding, - log_config::nesting_level_color, + << with_color(color_spec(log_config::encoding, + log_config::nesting_level_color), this->nesting_level_) << ")"; } diff --git a/include/indentlog/tag.hpp b/include/indentlog/tag.hpp index 258b432f..a6825bee 100644 --- a/include/indentlog/tag.hpp +++ b/include/indentlog/tag.hpp @@ -96,7 +96,7 @@ namespace xo { if(PrefixSpace) s << " "; - s << with_color(tag_config::encoding, tag_config::tag_color, concat((char const *)":", tag.name())) + s << with_color(color_spec(tag_config::encoding, tag_config::tag_color), concat((char const *)":", tag.name())) << " " << unq(tag.value()); return s;