aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/version/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-01-27 09:07:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-01-27 09:07:09 +0200
commit2169f0e960c6e2b94518c03e6eb0406908b96e65 (patch)
tree73cfda5d0c7aa38c74104cca89931045db37892e /libbuild2/version/init.cxx
parent1abc10223b37d9ead3454a06e176b4b65370a2be (diff)
Improve module loading API
Diffstat (limited to 'libbuild2/version/init.cxx')
-rw-r--r--libbuild2/version/init.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx
index 9a56756..3ab3621 100644
--- a/libbuild2/version/init.cxx
+++ b/libbuild2/version/init.cxx
@@ -303,8 +303,7 @@ namespace build2
// Load in.base (in.* variables, in{} target type).
//
- if (!cast_false<bool> (rs["in.base.loaded"]))
- load_module (rs, rs, "in.base", l);
+ load_module (rs, rs, "in.base", l);
module& m (static_cast<module&> (*mod));
const standard_version& v (m.version);
@@ -312,12 +311,11 @@ namespace build2
// If the dist module is used, set its dist.package and register the
// post-processing callback.
//
- if (auto* dm = rs.lookup_module<dist::module> (dist::module::name))
+ if (auto* dm = rs.find_module<dist::module> (dist::module::name))
{
// Make sure dist is init'ed, not just boot'ed.
//
- if (!cast_false<bool> (rs["dist.loaded"]))
- load_module (rs, rs, "dist", l);
+ load_module (rs, rs, "dist", l);
m.dist_uncommitted = cast_false<bool> (rs["config.dist.uncommitted"]);