From 460eb164f0051cf0ffab6860220649c4f03c74fb Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 15 Nov 2019 13:27:23 +0300 Subject: Use path_name_view in location and path_name_value in location_value --- libbuild2/diagnostics.hxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libbuild2/diagnostics.hxx') diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx index 4b3af4e..6a37561 100644 --- a/libbuild2/diagnostics.hxx +++ b/libbuild2/diagnostics.hxx @@ -300,7 +300,7 @@ namespace build2 location_prologue_base (const char* type, const char* mod, const char* name, - const path_name& f, + const path_name_view& f, stream_verbosity sverb) : type_ (type), mod_ (mod), name_ (name), loc_ (f), @@ -312,7 +312,7 @@ namespace build2 path&& f, stream_verbosity sverb) : type_ (type), mod_ (mod), name_ (name), - file_ (move (f)), loc_ (&file_), + file_ (move (f)), loc_ (file_), sverb_ (sverb) {} void @@ -367,6 +367,18 @@ namespace build2 return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ()); } + location_prologue + operator() (const path_name_view& f) const + { + return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ()); + } + + location_prologue + operator() (const path_name_value& f) const + { + return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ()); + } + // fail (relative (src)) << ... // location_prologue -- cgit v1.1