Version's compatibility with Slic3r extended with pre-release

compatibility check:
A release Slic3r is not compatible with alpha and beta configs,
a beta Slic3r is not compatible with alpha configs, but is compatible
with beta configs etc.
This commit is contained in:
bubnikv 2018-04-13 16:15:30 +02:00
parent 82890ec815
commit 6d25ed2b00
3 changed files with 128 additions and 1 deletions

View file

@ -77,6 +77,13 @@ public:
~Semver() { ::semver_free(&ver); }
// const accessors
int major() const { return ver.major; }
int minor() const { return ver.minor; }
int patch() const { return ver.patch; }
const char* prerelease() const { return ver.prerelease; }
const char* metadata() const { return ver.metadata; }
// Comparison
bool operator<(const Semver &b) const { return ::semver_compare(ver, b.ver) == -1; }
bool operator<=(const Semver &b) const { return ::semver_compare(ver, b.ver) <= 0; }