From ec203677f1de13c200e54813db73a8ed5be8d4c9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 12 Jul 2020 09:58:44 +0200 Subject: Cache subprojects variable value in scope::root_extra --- libbuild2/dist/operation.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbuild2/dist/operation.cxx') diff --git a/libbuild2/dist/operation.cxx b/libbuild2/dist/operation.cxx index 8dd8a6e..cce2239 100644 --- a/libbuild2/dist/operation.cxx +++ b/libbuild2/dist/operation.cxx @@ -232,9 +232,9 @@ namespace build2 // The same for subprojects that have been loaded. // - if (auto l = rs->vars[ctx.var_subprojects]) + if (const subprojects* ps = *rs->root_extra->subprojects) { - for (auto p: cast (l)) + for (auto p: *ps) { const dir_path& pd (p.second); dir_path out_nroot (out_root / pd); @@ -373,9 +373,9 @@ namespace build2 const scope* srs (rs); const module::callbacks* cbs (&mod.callbacks_); - if (auto l = rs->vars[ctx.var_subprojects]) + if (const subprojects* ps = *rs->root_extra->subprojects) { - for (auto p: cast (l)) + for (auto p: *ps) { const dir_path& pd (p.second); if (dl.sub (pd)) -- cgit v1.1