mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 11:47:54 -06:00
add version check
This commit is contained in:
parent
2266aa4d98
commit
9379ea1546
6 changed files with 111 additions and 6 deletions
|
@ -141,6 +141,15 @@ public:
|
|||
if (ver.metadata != nullptr) { res += '+'; res += ver.metadata; }
|
||||
return res;
|
||||
}
|
||||
std::string to_string_sf() const {
|
||||
//BBS: version format
|
||||
std::string res;
|
||||
res = (boost::format("%1%.%2%.%3%") % ver.major % ver.minor % ver.patch).str();
|
||||
|
||||
if (ver.prerelease != nullptr) { res += '-'; res += ver.prerelease; }
|
||||
if (ver.metadata != nullptr) { res += '+'; res += ver.metadata; }
|
||||
return res;
|
||||
}
|
||||
|
||||
// Arithmetics
|
||||
Semver& operator+=(const Major &b) { ver.major += b.i; return *this; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue