Skip to content

Commit ac4b35d

Browse files
SaltWeilanewei120
authored andcommitted
ENH: force to use . as decimal point
"std::cout << float number" is unsafe which may use , as decimal point when switch language. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I8a379117168eab0111dc93987b1d6130a741ade6
1 parent 67daaba commit ac4b35d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libslic3r/GCode/WipeTower.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class WipeTowerWriter
4949
{
5050
// adds tag for analyzer:
5151
std::ostringstream str;
52-
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height) << m_layer_height << "\n"; // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
52+
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height) << std::to_string(m_layer_height) << "\n"; // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
5353
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role) << ExtrusionEntity::role_to_string(erWipeTower) << "\n";
5454
m_gcode += str.str();
5555
change_analyzer_line_width(line_width);
@@ -58,7 +58,7 @@ class WipeTowerWriter
5858
WipeTowerWriter& change_analyzer_line_width(float line_width) {
5959
// adds tag for analyzer:
6060
std::stringstream str;
61-
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width) << line_width << "\n";
61+
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width) << std::to_string(line_width) << "\n";
6262
m_gcode += str.str();
6363
return *this;
6464
}

0 commit comments

Comments
 (0)