From 47bf5cd6a167730ee06a1c7cffeae6540f67dde0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 14 Aug 2015 15:48:34 +0200 Subject: Rework meta/operation registration We now have global tables for meta/operation. Plus each can then be enabled on the per-project basis. --- build/file.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'build/file.cxx') diff --git a/build/file.cxx b/build/file.cxx index 305c13a..e5deecf 100644 --- a/build/file.cxx +++ b/build/file.cxx @@ -118,19 +118,17 @@ namespace build { scope& rs (scopes.insert (out_root, true).first); - // Enter built-in meta-operation and operation names. Note that - // the order of registration should match the id constants; see - // for details. Loading of modules (via the src - // bootstrap; see below) can result in additional names being - // added. + // Enter built-in meta-operation and operation names. Loading of + // modules (via the src bootstrap; see below) can result in + // additional meta/operations being added. // if (rs.meta_operations.empty ()) { - assert (rs.meta_operations.insert (perform) == perform_id); + rs.meta_operations.insert (perform_id, perform); - assert (rs.operations.insert (default_) == default_id); - assert (rs.operations.insert (update) == update_id); - assert (rs.operations.insert (clean) == clean_id); + rs.operations.insert (default_id, default_); + rs.operations.insert (update_id, update); + rs.operations.insert (clean_id, clean); } // If this is already a root scope, verify that things are -- cgit v1.1