aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-09 07:40:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-09 07:40:54 +0200
commitb8cffb11a45add241e4b8420ba96e116efccfbd9 (patch)
tree70bc6987e60c7415b351111517a4bc7eea74f93c /libbuild2/variable.hxx
parentdd1cb295722a049fe21c8d0311cb1823ccb0e508 (diff)
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.
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r--libbuild2/variable.hxx5
1 files changed, 4 insertions, 1 deletions
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));}