about summary refs log tree commit diff stats
path: root/src/version.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/version.h')
-rw-r--r--src/version.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/version.h b/src/version.h index f127610..7c3d3ad 100644 --- a/src/version.h +++ b/src/version.h
@@ -1,9 +1,10 @@
1#ifndef VERSION_H_C757E53C 1#ifndef VERSION_H_C757E53C
2#define VERSION_H_C757E53C 2#define VERSION_H_C757E53C
3 3
4#include <iostream>
5#include <regex> 4#include <regex>
6 5
6#include <fmt/core.h>
7
7struct Version { 8struct Version {
8 int major = 0; 9 int major = 0;
9 int minor = 0; 10 int minor = 0;
@@ -23,6 +24,10 @@ struct Version {
23 } 24 }
24 } 25 }
25 26
27 std::string ToString() const {
28 return fmt::format("v{}.{}.{}", major, minor, revision);
29 }
30
26 bool operator<(const Version& rhs) const { 31 bool operator<(const Version& rhs) const {
27 return (major < rhs.major) || 32 return (major < rhs.major) ||
28 (major == rhs.major && 33 (major == rhs.major &&
@@ -31,10 +36,6 @@ struct Version {
31 } 36 }
32}; 37};
33 38
34std::ostream& operator<<(std::ostream& out, const Version& ver) { 39constexpr const Version kTrackerVersion = Version(0, 10, 3);
35 return out << "v" << ver.major << "." << ver.minor << "." << ver.revision;
36}
37
38constexpr const Version kTrackerVersion = Version(0, 9, 1);
39 40
40#endif /* end of include guard: VERSION_H_C757E53C */ \ No newline at end of file 41#endif /* end of include guard: VERSION_H_C757E53C */ \ No newline at end of file