mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 09:35:56 +08:00
Regression fix of percent config values serialization.
This commit is contained in:
parent
102329c54d
commit
0a692cc497
@ -104,7 +104,6 @@ class ConfigOptionFloat : public ConfigOptionSingle<double>
|
|||||||
class ConfigOptionFloats : public ConfigOptionVector<double>
|
class ConfigOptionFloats : public ConfigOptionVector<double>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (std::vector<double>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (std::vector<double>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
@ -164,7 +163,6 @@ class ConfigOptionInt : public ConfigOptionSingle<int>
|
|||||||
class ConfigOptionInts : public ConfigOptionVector<int>
|
class ConfigOptionInts : public ConfigOptionVector<int>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
@ -218,7 +216,6 @@ class ConfigOptionString : public ConfigOptionSingle<std::string>
|
|||||||
class ConfigOptionStrings : public ConfigOptionVector<std::string>
|
class ConfigOptionStrings : public ConfigOptionVector<std::string>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
return escape_strings_cstyle(this->values);
|
return escape_strings_cstyle(this->values);
|
||||||
};
|
};
|
||||||
@ -263,7 +260,7 @@ class ConfigOptionPercents : public ConfigOptionFloats
|
|||||||
public:
|
public:
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (const auto v : this->values) {
|
for (const auto &v : this->values) {
|
||||||
if (&v != &this->values.front()) ss << ",";
|
if (&v != &this->values.front()) ss << ",";
|
||||||
ss << v << "%";
|
ss << v << "%";
|
||||||
}
|
}
|
||||||
@ -365,7 +362,6 @@ class ConfigOptionPoint : public ConfigOptionSingle<Pointf>
|
|||||||
class ConfigOptionPoints : public ConfigOptionVector<Pointf>
|
class ConfigOptionPoints : public ConfigOptionVector<Pointf>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (Pointfs::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (Pointfs::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
@ -428,7 +424,6 @@ class ConfigOptionBool : public ConfigOptionSingle<bool>
|
|||||||
class ConfigOptionBools : public ConfigOptionVector<bool>
|
class ConfigOptionBools : public ConfigOptionVector<bool>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (std::vector<bool>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (std::vector<bool>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user