Fixed two more locales-related issues

One warning was also fixed
This commit is contained in:
Lukas Matena 2021-06-07 12:30:57 +02:00
parent 8e75919948
commit 1f29a2593b
4 changed files with 4 additions and 3 deletions

View file

@ -178,7 +178,7 @@ private:
auto it_val = it->second.find(parameter_name);
if (it_val == it->second.end())
return false;
out = T(::atof(it_val->second.c_str()));
out = T(string_to_double_decimal_point(it_val->second));
return true;
}

View file

@ -1494,6 +1494,7 @@ Transformation Transformation::volume_to_bed_transformation(const Transformation
// For parsing a transformation matrix from 3MF / AMF.
Transform3d transform3d_from_string(const std::string& transform_str)
{
assert(is_decimal_separator_point()); // for atof
Transform3d transform = Transform3d::Identity();
if (!transform_str.empty())

View file

@ -1217,7 +1217,7 @@ boost::any& Choice::get_value()
else if (m_opt.type == coInt)
m_value = atoi(m_opt.enum_values[ret_enum].c_str());
else
m_value = atof(m_opt.enum_values[ret_enum].c_str());
m_value = string_to_double_decimal_point(m_opt.enum_values[ret_enum]);
}
else
// modifies ret_string!

View file

@ -3913,7 +3913,7 @@ void ObjectList::apply_volumes_order()
if (wxGetApp().app_config->get("order_volumes") != "1" || !m_objects)
return;
for (int obj_idx = 0; obj_idx < m_objects->size(); obj_idx++)
for (size_t obj_idx = 0; obj_idx < m_objects->size(); obj_idx++)
reorder_volumes_and_get_selection(obj_idx);
}