Serialization works in new version
This commit is contained in:
parent
6b3ce01e94
commit
79f7135746
23 changed files with 186 additions and 56 deletions
|
|
@ -5,6 +5,18 @@ std::string version_numbers_to_version_str(const VersionNumber& versionNum) {
|
|||
return std::to_string(versionNum.major) + "." + std::to_string(versionNum.minor) + "." + std::to_string(versionNum.patch);
|
||||
}
|
||||
|
||||
bool operator<=(const VersionNumber& a, const VersionNumber& b) {
|
||||
return !(a > b);
|
||||
}
|
||||
|
||||
bool operator<(const VersionNumber& a, const VersionNumber& b) {
|
||||
return !(a >= b);
|
||||
}
|
||||
|
||||
bool operator>=(const VersionNumber& a, const VersionNumber& b) {
|
||||
return (a > b) || (a == b);
|
||||
}
|
||||
|
||||
bool operator>(const VersionNumber& a, const VersionNumber& b) {
|
||||
return (a.major > b.major) || (a.major == b.major && (a.minor > b.minor || (a.minor == b.minor && a.patch > b.patch)));
|
||||
}
|
||||
|
|
@ -13,6 +25,10 @@ bool operator==(const VersionNumber& a, const VersionNumber& b) {
|
|||
return a.major == b.major && a.minor == b.minor && a.patch == b.patch;
|
||||
}
|
||||
|
||||
bool operator!=(const VersionNumber& a, const VersionNumber& b) {
|
||||
return a.major != b.major || a.minor != b.minor || a.patch != b.patch;
|
||||
}
|
||||
|
||||
std::optional<VersionNumber> version_str_to_version_numbers(const std::string& versionStr) {
|
||||
try {
|
||||
std::vector<std::string> splitStrings = split_string_by_token(versionStr, ".");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue