From 20677fb264e743b8e5423af31a7d8dc06cf509f6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Mar 2016 15:27:12 +0200 Subject: Cleanup typed variable assignment --- build2/context.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'build2/context.cxx') diff --git a/build2/context.cxx b/build2/context.cxx index 746592d..49edc1c 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -87,20 +87,20 @@ namespace build2 scope& gs (*global_scope); - gs.assign ("build.work", dir_path_type) = work; - gs.assign ("build.home", dir_path_type) = home; + gs.assign ("build.work") = work; + gs.assign ("build.home") = home; // @@ Backwards-compatibility hack. // - gs.assign ("__build2_greater_than_0_2_0_hack__", bool_type) = true; + gs.assign ("__build2_greater_than_0_2_0_hack__") = true; // Enter the version. // // @@ VAR types // { - gs.assign ("build.version", string_type) = to_string (BUILD2_VERSION); - gs.assign ("build.version.string", string_type) = BUILD2_VERSION_STR; + gs.assign ("build.version") = to_string (BUILD2_VERSION); + gs.assign ("build.version.string") = BUILD2_VERSION_STR; // AABBCCDD // @@ -109,10 +109,10 @@ namespace build2 return to_string ((BUILD2_VERSION / d)% 100); }; - gs.assign ("build.version.release", string_type) = comp (1); - gs.assign ("build.version.patch", string_type) = comp (100); - gs.assign ("build.version.minor", string_type) = comp (10000); - gs.assign ("build.version.major", string_type) = comp (1000000); + gs.assign ("build.version.release") = comp (1); + gs.assign ("build.version.patch") = comp (100); + gs.assign ("build.version.minor") = comp (10000); + gs.assign ("build.version.major") = comp (1000000); } // Enter the host information. Rather than jumping through hoops like @@ -145,12 +145,12 @@ namespace build2 // Enter as build.host.{cpu,vendor,system,version,class}. // - gs.assign ("build.host", string_type) = move (canon); - gs.assign ("build.host.cpu", string_type) = move (t.cpu); - gs.assign ("build.host.vendor", string_type) = move (t.vendor); - gs.assign ("build.host.system", string_type) = move (t.system); - gs.assign ("build.host.version", string_type) = move (t.version); - gs.assign ("build.host.class", string_type) = move (t.class_); + gs.assign ("build.host") = move (canon); + gs.assign ("build.host.cpu") = move (t.cpu); + gs.assign ("build.host.vendor") = move (t.vendor); + gs.assign ("build.host.system") = move (t.system); + gs.assign ("build.host.version") = move (t.version); + gs.assign ("build.host.class") = move (t.class_); } catch (const invalid_argument& e) { -- cgit v1.1