mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-16 02:02:42 -07:00
Refactor: Move Semver from slice3r to libslic3r
A static symbol Slic3r::SEMVER is introduced, which holds the running slicer's Semver object. This is mainly done to make testing updater behaviour _much_ easier. Additionaly to cleanup some questionable code (Semver was being parsed multiple times / in multiple places in the frontend.)
This commit is contained in:
@@ -15,7 +15,6 @@ namespace Slic3r {
|
||||
namespace GUI {
|
||||
namespace Config {
|
||||
|
||||
static const Semver s_current_slic3r_semver(SLIC3R_VERSION);
|
||||
|
||||
// Optimized lexicographic compare of two pre-release versions, ignoring the numeric suffix.
|
||||
static int compare_prerelease(const char *p1, const char *p2)
|
||||
@@ -64,7 +63,7 @@ bool Version::is_slic3r_supported(const Semver &slic3r_version) const
|
||||
|
||||
bool Version::is_current_slic3r_supported() const
|
||||
{
|
||||
return this->is_slic3r_supported(s_current_slic3r_semver);
|
||||
return this->is_slic3r_supported(Slic3r::SEMVER);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user