diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-10 19:13:22 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-10 19:13:22 -0400 |
commit | 33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea (patch) | |
tree | b1db5d3e83ccd8c5219d5db12b01bc3d152b79d1 /src/version.h | |
parent | 3b3c3ca4ed98c8d1e884f6c9f8f63d7b7c76e37b (diff) | |
download | lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.tar.gz lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.tar.bz2 lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.zip |
Go back to old logging system
Brought in libfmt to handle string formatting and replace a bunch of ostringstream uses.
Diffstat (limited to 'src/version.h')
-rw-r--r-- | src/version.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/version.h b/src/version.h index 7aab91b..060d557 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 <sstream> | ||
5 | #include <regex> | 4 | #include <regex> |
6 | 5 | ||
6 | #include <fmt/core.h> | ||
7 | |||
7 | struct Version { | 8 | struct Version { |
8 | int major = 0; | 9 | int major = 0; |
9 | int minor = 0; | 10 | int minor = 0; |
@@ -24,9 +25,7 @@ struct Version { | |||
24 | } | 25 | } |
25 | 26 | ||
26 | std::string ToString() const { | 27 | std::string ToString() const { |
27 | std::ostringstream output; | 28 | return fmt::format("v{}.{}.{}", major, minor, revision); |
28 | output << "v" << major << "." << minor << "." << revision; | ||
29 | return output.str(); | ||
30 | } | 29 | } |
31 | 30 | ||
32 | bool operator<(const Version& rhs) const { | 31 | bool operator<(const Version& rhs) const { |