diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-28 15:59:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-28 16:03:35 +0200 |
commit | 96f2131e593e206f0e458409f22adfff8c1b5356 (patch) | |
tree | fdb71a7a435d631872e0413dbe13113a636932de /build2/context.cxx | |
parent | 69801c4e23f877359118e55ed291737f4fbece04 (diff) |
Clean up variable usage
Diffstat (limited to 'build2/context.cxx')
-rw-r--r-- | build2/context.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
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<string> ("build.version") = to_string (BUILD2_VERSION); + gs.assign<uint64_t> ("build.version") = uint64_t (BUILD2_VERSION); gs.assign<string> ("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<string> ("build.version.release") = comp (1); - gs.assign<string> ("build.version.patch") = comp (100); - gs.assign<string> ("build.version.minor") = comp (10000); - gs.assign<string> ("build.version.major") = comp (1000000); + gs.assign<uint64_t> ("build.version.release") = comp (1); + gs.assign<uint64_t> ("build.version.patch") = comp (100); + gs.assign<uint64_t> ("build.version.minor") = comp (10000); + gs.assign<uint64_t> ("build.version.major") = comp (1000000); } // Enter the host information. Rather than jumping through hoops like |