From 31f803442245b2d41fe5f081da40c9b447f42e1f Mon Sep 17 00:00:00 2001 From: "salt.wei" Date: Thu, 9 Mar 2023 15:35:23 +0800 Subject: [PATCH] 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 Change-Id: I8a379117168eab0111dc93987b1d6130a741ade6 --- src/libslic3r/GCode/WipeTower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 130496b6c..c0e88255c 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -49,7 +49,7 @@ public: { // adds tag for analyzer: std::ostringstream str; - 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 + 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 str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role) << ExtrusionEntity::role_to_string(erWipeTower) << "\n"; m_gcode += str.str(); change_analyzer_line_width(line_width); @@ -58,7 +58,7 @@ public: WipeTowerWriter& change_analyzer_line_width(float line_width) { // adds tag for analyzer: std::stringstream str; - str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width) << line_width << "\n"; + str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width) << std::to_string(line_width) << "\n"; m_gcode += str.str(); return *this; }