From ba9137db8e456eb00b921a855e5383b78fa7a8ec Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 18 Apr 2017 14:24:15 +0300 Subject: Make use of butl::operator<<(ostream,process_args) --- build2/diagnostics.cxx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'build2/diagnostics.cxx') diff --git a/build2/diagnostics.cxx b/build2/diagnostics.cxx index 7b312a1..0c4e63f 100644 --- a/build2/diagnostics.cxx +++ b/build2/diagnostics.cxx @@ -6,6 +6,8 @@ #include // strchr() +#include + using namespace std; namespace build2 @@ -21,23 +23,10 @@ namespace build2 print_process (r, args, n); } - struct process_args - { - const char* const* a; - size_t n; - }; - - inline static ostream& - operator<< (ostream& o, const process_args& p) - { - process::print (o, p.a, p.n); - return o; - } - void print_process (diag_record& r, const char* const* args, size_t n) { - r << process_args {args, n}; + r << butl::process_args {args, n}; } // Diagnostics verbosity level. -- cgit v1.1