diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-18 14:24:15 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-18 14:24:15 +0300 |
commit | ba9137db8e456eb00b921a855e5383b78fa7a8ec (patch) | |
tree | 68cbaddf2296c13dc46fb773aaa8805c05103150 | |
parent | 6d076270ccf7ee147c48353e758b4629d165007f (diff) |
Make use of butl::operator<<(ostream,process_args)
-rw-r--r-- | build2/diagnostics.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
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 <cstring> // strchr() +#include <butl/process-io> + 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. |