From bef7c36a3479b9b83eaf4be9ef090b21d6468f12 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Jul 2015 10:01:36 +0200 Subject: Make subprojects list of name=subdir pairs --- build/variable | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build/variable') diff --git a/build/variable b/build/variable index 10e6247..2bb3393 100644 --- a/build/variable +++ b/build/variable @@ -35,10 +35,10 @@ namespace build struct variable { explicit - variable (std::string n): name (std::move (n)) {} + variable (std::string n, char p = '\0'): name (std::move (n)), pairs (p) {} std::string name; - char pairs = '\0'; + char pairs; //const value_type* type = nullptr; // If NULL, then no fixed type. }; @@ -253,6 +253,9 @@ namespace build // const variable& find (std::string name) {return *emplace (std::move (name)).first;} + + const variable& + insert (variable v) {return *emplace (std::move (v)).first;} }; extern variable_set variable_pool; -- cgit v1.1