From 61617d7bb990f04970c6357d8e9a9095174d8fc4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Jun 2016 16:36:53 +0200 Subject: Minor module interface cleanups --- build2/cli/module.cxx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'build2/cli') diff --git a/build2/cli/module.cxx b/build2/cli/module.cxx index 44b36a1..478c8a8 100644 --- a/build2/cli/module.cxx +++ b/build2/cli/module.cxx @@ -36,18 +36,13 @@ namespace build2 tracer trace ("cli::init"); l5 ([&]{trace << "for " << base.out_path ();}); - // Make sure the cxx module has been loaded since we need its - // targets types (?xx{}). Note that we don't try to load it - // ourselves because of the non-trivial variable merging - // semantics. So it is better to let the user load cxx - // explicitly. + // Make sure the cxx module has been loaded since we need its targets + // types (?xx{}). Note that we don't try to load it ourselves because of + // the non-trivial variable merging semantics. So it is better to let + // the user load cxx explicitly. // - { - auto l (base["cxx.loaded"]); - - if (!l || !cast (l)) - fail (loc) << "cxx module must be loaded before cli"; - } + if (!cast_false (base["cxx.loaded"])) + fail (loc) << "cxx module must be loaded before cli"; // Enter module variables. // -- cgit v1.1