aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-01-28 08:11:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-01-28 08:11:16 +0200
commitc0105aad0074aee0efb3ba41f8132496412f8790 (patch)
tree30fe24cfe2e63c7cacdd7d45d875ca75f35bede2 /build2
parent36fa3bc49a739a3bb1212a1b37fd2c817d4ee1dc (diff)
Use scope::insert_rule()
Diffstat (limited to 'build2')
-rw-r--r--build2/cli/init.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx
index 89da97a..23ebd83 100644
--- a/build2/cli/init.cxx
+++ b/build2/cli/init.cxx
@@ -343,20 +343,18 @@ namespace build2
// Register our rules.
//
{
- auto& r (bs.rules);
-
- auto reg = [&r] (meta_operation_id mid, operation_id oid)
+ auto reg = [&bs] (meta_operation_id mid, operation_id oid)
{
- r.insert<cli_cxx> (mid, oid, "cli.compile", compile_rule_);
- r.insert<cxx::hxx> (mid, oid, "cli.compile", compile_rule_);
- r.insert<cxx::cxx> (mid, oid, "cli.compile", compile_rule_);
- r.insert<cxx::ixx> (mid, oid, "cli.compile", compile_rule_);
+ bs.insert_rule<cli_cxx> (mid, oid, "cli.compile", compile_rule_);
+ bs.insert_rule<cxx::hxx> (mid, oid, "cli.compile", compile_rule_);
+ bs.insert_rule<cxx::cxx> (mid, oid, "cli.compile", compile_rule_);
+ bs.insert_rule<cxx::ixx> (mid, oid, "cli.compile", compile_rule_);
};
reg (perform_id, update_id);
reg (perform_id, clean_id);
- // Other rules (e.g., cxx::compile) may need to have the group members
+ // Other rules (e.g., cc::compile) may need to have the group members
// resolved/linked up. Looks like a general pattern: groups should
// resolve on *(update).
//