From 4e665067ff264c55086fdfb776a95b0fbb4d432c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Feb 2016 16:10:48 +0200 Subject: / scheme cleanup --- build2/operation | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'build2/operation') diff --git a/build2/operation b/build2/operation index c5af3ed..688663b 100644 --- a/build2/operation +++ b/build2/operation @@ -5,15 +5,10 @@ #ifndef BUILD2_OPERATION #define BUILD2_OPERATION -#include -#include -#include -#include -#include // reference_wrapper - #include #include +#include namespace build2 { @@ -29,9 +24,9 @@ namespace build2 // // Note that 0 is not a valid meta/operation/action id. // - using meta_operation_id = std::uint8_t; - using operation_id = std::uint8_t; - using action_id = std::uint8_t; + using meta_operation_id = uint8_t; + using operation_id = uint8_t; + using action_id = uint8_t; // Meta-operations and operations are not the end of the story. We // also have operation nesting (currently only one level deep) which @@ -99,8 +94,8 @@ namespace build2 inline bool operator!= (action x, action y) {return !(x == y);} - std::ostream& - operator<< (std::ostream&, action); + ostream& + operator<< (ostream&, action); // Id constants for build-in and pre-defined meta/operations. // @@ -175,18 +170,18 @@ namespace build2 // Normally a list of resolved and matched targets to execute. But // can be something else, depending on the meta-operation. // - typedef std::vector action_targets; + typedef vector action_targets; struct meta_operation_info { - const std::string name; + const string name; // Name derivatives for diagnostics. If empty, then the meta- // operation need not be mentioned. // - const std::string name_do; // E.g., [to] 'configure'. - const std::string name_doing; // E.g., [while] 'configuring'. - const std::string name_done; // E.g., 'is configured'. + const string name_do; // E.g., [to] 'configure'. + const string name_doing; // E.g., [while] 'configuring'. + const string name_done; // E.g., 'is configured'. // If operation_pre() is not NULL, then it may translate default_id // (and only default_id) to some other operation. If not translated, @@ -258,7 +253,7 @@ namespace build2 // struct operation_info { - const std::string name; + const string name; // Name derivatives for diagnostics. Note that unlike meta-operations, // these can only be empty for the default operation (id 1), And @@ -266,9 +261,9 @@ namespace build2 // have empty derivatives (failed which only target name will be // printed). // - const std::string name_do; // E.g., [to] 'update'. - const std::string name_doing; // E.g., [while] 'updating'. - const std::string name_done; // E.g., 'is up to date'. + const string name_do; // E.g., [to] 'update'. + const string name_doing; // E.g., [while] 'updating'. + const string name_done; // E.g., 'is up to date'. const execution_mode mode; @@ -317,7 +312,7 @@ namespace build2 template struct sparse_vector { - using base_type = std::vector; + using base_type = vector; using size_type = typename base_type::size_type; void -- cgit v1.1