From 4e665067ff264c55086fdfb776a95b0fbb4d432c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Feb 2016 16:10:48 +0200 Subject: / scheme cleanup --- build2/diagnostics | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'build2/diagnostics') diff --git a/build2/diagnostics b/build2/diagnostics index 27c71fa..5ad6809 100644 --- a/build2/diagnostics +++ b/build2/diagnostics @@ -5,19 +5,11 @@ #ifndef BUILD2_DIAGNOSTICS #define BUILD2_DIAGNOSTICS -#include // size_t -#include -#include -#include #include -#include -#include #include -#include - #include -#include +#include namespace build2 { @@ -39,10 +31,10 @@ namespace build2 // nameN arg arg ... nullptr nullptr // void - print_process (diag_record&, const char* const* args, std::size_t n = 0); + print_process (diag_record&, const char* const* args, size_t n = 0); void - print_process (const char* const* args, std::size_t n = 0); + print_process (const char* const* args, size_t n = 0); inline void print_process (diag_record& dr, const cstrings& args) @@ -105,21 +97,21 @@ namespace build2 extern const int stream_verb_index; inline uint16_t - stream_verb (std::ostream& os) + stream_verb (ostream& os) { uint16_t v (static_cast (os.iword (stream_verb_index))); return v == 0 ? stream_verb_max : v - 1; } inline void - stream_verb (std::ostream& os, uint16_t v) + stream_verb (ostream& os, uint16_t v) { os.iword (stream_verb_index) = static_cast (v + 1); } // Diagnostic facility, base infrastructure (potentially reusable). // - extern std::ostream* diag_stream; + extern ostream* diag_stream; template struct diag_prologue; template struct diag_mark; @@ -171,7 +163,7 @@ namespace build2 @@ libstdc++ doesn't yet have the ostringstream move support. diag_record (diag_record&& r) - : os_ (std::move (r.os_)) + : os_ (move (r.os_)) { empty_ = r.empty_; r.empty_ = true; @@ -216,11 +208,11 @@ namespace build2 template diag_prologue (A&&... a) - : B (std::forward (a)...), epilogue_ (nullptr) {} + : B (forward (a)...), epilogue_ (nullptr) {} template diag_prologue (diag_epilogue e, A&&... a) - : B (std::forward (a)...), epilogue_ (e) {} + : B (forward (a)...), epilogue_ (e) {} template diag_record @@ -251,7 +243,7 @@ namespace build2 diag_mark (): B () {} template - diag_mark (A&&... a): B (std::forward (a)...) {} + diag_mark (A&&... a): B (forward (a)...) {} template diag_record @@ -291,12 +283,12 @@ namespace build2 // Note that location maintains a shallow reference to path. // location (): file (nullptr), line (0), column (0) {} - location (const path* f, std::uint64_t l, std::uint64_t c) + location (const path* f, uint64_t l, uint64_t c) : file (f), line (l), column (c) {} const path* file; - std::uint64_t line; - std::uint64_t column; + uint64_t line; + uint64_t column; }; struct location_prologue_base -- cgit v1.1