aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx16
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