From b8cffb11a45add241e4b8420ba96e116efccfbd9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Jun 2020 07:40:54 +0200 Subject: Make metadata variable prefix mandatory While we could automatically set it if the target is imported, there is nothing we can do if the target is used in the same project. So to avoid confusion we make it mandatory. --- libbuild2/variable.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index c1cfa84..08d4612 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -715,7 +715,10 @@ namespace build2 { static_assert (sizeof (uint64_t) <= value::size_, "insufficient space"); - static uint64_t convert (name&&, name*); + // Note: in some places we rely on the convert() function not changing + // the passed names thus we make them const. + // + static uint64_t convert (const name&, const name*); static void assign (value&, uint64_t); static void append (value&, uint64_t); // ADD. static name reverse (uint64_t x) {return name (to_string (x));} -- cgit v1.1