aboutsummaryrefslogtreecommitdiff
path: root/build2/cli/init.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-08-16 09:16:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-08-16 09:16:04 +0200
commit50bf3956c88ee6341d0023a421d502d604e3da4f (patch)
tree5623ab17dc95485d1930f72e6577d95868caef47 /build2/cli/init.cxx
parentbcb9588ea24d32055c5cc0493efc737b168f4978 (diff)
Redo modules map as vector
Diffstat (limited to 'build2/cli/init.cxx')
-rw-r--r--build2/cli/init.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx
index 8f9df4a..eadf32c 100644
--- a/build2/cli/init.cxx
+++ b/build2/cli/init.cxx
@@ -55,7 +55,7 @@ namespace build2
scope& bs,
const location& loc,
bool,
- bool optional,
+ bool opt,
module_init_extra& extra)
{
tracer trace ("cli::guess_init");
@@ -90,7 +90,7 @@ namespace build2
rs,
name ("cli", dir_path (), "exe", "cli"), // cli%exe{cli}
true /* phase2 */,
- optional,
+ opt,
true /* metadata */,
loc,
"module load"));
@@ -150,7 +150,7 @@ namespace build2
scope& bs,
const location& loc,
bool,
- bool optional,
+ bool opt,
module_init_extra& extra)
{
tracer trace ("cli::config_init");
@@ -163,8 +163,8 @@ namespace build2
// Load cli.guess and share its module instance as ours.
//
- if (const shared_ptr<build2::module>* r = load_module (
- rs, rs, "cli.guess", loc, optional, extra.hints))
+ if (optional<shared_ptr<build2::module>> r = load_module (
+ rs, rs, "cli.guess", loc, opt, extra.hints))
{
extra.module = *r;
}
@@ -173,7 +173,7 @@ namespace build2
// This can happen if someone already optionally loaded cli.guess
// and it has failed to configure.
//
- if (!optional)
+ if (!opt)
fail (loc) << "cli could not be configured" <<
info << "re-run with -V for more information";
@@ -198,7 +198,7 @@ namespace build2
scope& bs,
const location& loc,
bool,
- bool optional,
+ bool opt,
module_init_extra& extra)
{
tracer trace ("cli::init");
@@ -220,8 +220,8 @@ namespace build2
// Load cli.config and get its module instance.
//
- if (const shared_ptr<build2::module>* r = load_module (
- rs, rs, "cli.config", loc, optional, extra.hints))
+ if (optional<shared_ptr<build2::module>> r = load_module (
+ rs, rs, "cli.config", loc, opt, extra.hints))
{
extra.module = *r;
}
@@ -230,7 +230,7 @@ namespace build2
// This can happen if someone already optionally loaded cli.config
// and it has failed to configure.
//
- if (!optional)
+ if (!opt)
fail (loc) << "cli could not be configured" <<
info << "re-run with -V for more information";