From 96f2131e593e206f0e458409f22adfff8c1b5356 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Mar 2016 15:59:06 +0200 Subject: Clean up variable usage --- build2/context.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'build2/context.cxx') diff --git a/build2/context.cxx b/build2/context.cxx index 53ea467..8941f3e 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -96,23 +96,21 @@ namespace build2 // Enter the version. // - // @@ VAR types - // { - gs.assign ("build.version") = to_string (BUILD2_VERSION); + gs.assign ("build.version") = uint64_t (BUILD2_VERSION); gs.assign ("build.version.string") = BUILD2_VERSION_STR; // AABBCCDD // - auto comp = [] (unsigned int d) -> string + auto comp = [] (unsigned int d) -> uint64_t { - return to_string ((BUILD2_VERSION / d)% 100); + return (BUILD2_VERSION / d) % 100; }; - 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); + 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 -- cgit v1.1