mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 00:01:09 -06:00
Removed some obsolete Perl binding.
Added Version Index "version" method. Implemented automatic selection of default_print_profile and default_filament_profile, when the print / filament profiles are not compatible with the selected printer profile. Fixed selection of a printer profile, if the currently selected printer profile becomes invisible.
This commit is contained in:
parent
0f6fc689aa
commit
82890ec815
18 changed files with 146 additions and 550 deletions
|
@ -175,6 +175,9 @@ semver_parse_version (const char *str, semver_t *ver) {
|
|||
slice = (char *) str;
|
||||
index = 0;
|
||||
|
||||
// non mandatory
|
||||
ver->patch = 0;
|
||||
|
||||
while (slice != NULL && index++ < 4) {
|
||||
next = strchr(slice, DELIMITER[0]);
|
||||
if (next == NULL)
|
||||
|
@ -200,7 +203,8 @@ semver_parse_version (const char *str, semver_t *ver) {
|
|||
slice = next + 1;
|
||||
}
|
||||
|
||||
return (index == 3) ? 0 : -1;
|
||||
// Major and minor versions are mandatory, patch version is not mandatory.
|
||||
return (index == 2 || index == 3) ? 0 : -1;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -632,4 +636,5 @@ semver_copy(const semver_t *ver) {
|
|||
if (ver->prerelease != NULL) {
|
||||
res.prerelease = strdup(ver->prerelease);
|
||||
}
|
||||
return res;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue