Fixed second batch of locale-dependent calls
This commit is contained in:
parent
9ee2fc8275
commit
fef385cd6b
13 changed files with 78 additions and 45 deletions
src/libslic3r/GCode
|
@ -670,7 +670,7 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename)
|
|||
|
||||
std::string time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - it->elapsed_time));
|
||||
std::string next_time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - next_it->elapsed_time));
|
||||
is_last |= (std::stof(time_float_str) > 0.0f && std::stof(next_time_float_str) == 0.0f);
|
||||
is_last |= (string_to_double_decimal_point(time_float_str) > 0. && string_to_double_decimal_point(next_time_float_str) == 0.);
|
||||
}
|
||||
|
||||
if (is_last) {
|
||||
|
@ -1373,7 +1373,7 @@ void GCodeProcessor::apply_config_simplify3d(const std::string& filename)
|
|||
if (pos != cmt.npos) {
|
||||
pos = cmt.find(',', pos);
|
||||
if (pos != cmt.npos) {
|
||||
out = std::stod(cmt.substr(pos + 1));
|
||||
out = string_to_double_decimal_point(cmt.substr(pos+1));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1523,9 +1523,9 @@ template<typename T>
|
|||
else if constexpr (std::is_same_v<T, long>)
|
||||
out = std::stol(str, &read);
|
||||
else if constexpr (std::is_same_v<T, float>)
|
||||
out = std::stof(str, &read);
|
||||
out = string_to_double_decimal_point(str, &read);
|
||||
else if constexpr (std::is_same_v<T, double>)
|
||||
out = std::stod(str, &read);
|
||||
out = string_to_double_decimal_point(str, &read);
|
||||
return str.size() == read;
|
||||
} catch (...) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue