nixpkgs/pkgs/applications/misc/slic3r/gcc6.patch

41 lines
1.2 KiB
Diff
Raw Normal View History

2017-09-04 20:01:04 +00:00
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);
};
};