Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(cherry picked from commit 707ee76)
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git i/xs/src/libslic3r/Config.hpp w/xs/src/libslic3r/Config.hpp | ||
index 49e999b..d9b65d8 100644 | ||
--- i/xs/src/libslic3r/Config.hpp | ||
+++ w/xs/src/libslic3r/Config.hpp | ||
@@ -65,7 +65,7 @@ class ConfigOptionFloat : public ConfigOption | ||
|
||
bool deserialize(std::string str) { | ||
std::istringstream iss(str); | ||
- return iss >> this->value; | ||
+ return bool(iss >> this->value); | ||
}; | ||
}; | ||
|
||
@@ -124,7 +124,7 @@ class ConfigOptionInt : public ConfigOption | ||
|
||
bool deserialize(std::string str) { | ||
std::istringstream iss(str); | ||
- return iss >> this->value; | ||
+ return bool(iss >> this->value); | ||
}; | ||
}; | ||
|
||
@@ -249,7 +249,7 @@ class ConfigOptionPercent : public ConfigOption | ||
bool deserialize(std::string str) { | ||
// don't try to parse the trailing % since it's optional | ||
std::istringstream iss(str); | ||
- return iss >> this->value; | ||
+ return bool(iss >> this->value); | ||
}; | ||
}; | ||
|
||
@@ -279,7 +279,7 @@ class ConfigOptionFloatOrPercent : public ConfigOption | ||
bool deserialize(std::string str) { | ||
this->percent = str.find_first_of("%") != std::string::npos; | ||
std::istringstream iss(str); | ||
- return iss >> this->value; | ||
+ return bool(iss >> this->value); | ||
}; | ||
}; | ||
|