mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Fixed a bug in parsering a Point from a config file.
This commit is contained in:
@@ -644,12 +644,9 @@ public:
|
|||||||
bool deserialize(const std::string &str, bool append = false) override
|
bool deserialize(const std::string &str, bool append = false) override
|
||||||
{
|
{
|
||||||
UNUSED(append);
|
UNUSED(append);
|
||||||
std::istringstream iss(str);
|
char dummy;
|
||||||
iss >> this->value.x;
|
return sscanf(str.data(), " %lf , %lf %c", &this->value.x, &this->value.y, &dummy) == 2 ||
|
||||||
iss.ignore(std::numeric_limits<std::streamsize>::max(), ',');
|
sscanf(str.data(), " %lf x %lf %c", &this->value.x, &this->value.y, &dummy) == 2;
|
||||||
iss.ignore(std::numeric_limits<std::streamsize>::max(), 'x');
|
|
||||||
iss >> this->value.y;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user