Fixed second batch of locale-dependent calls

This commit is contained in:
Lukas Matena 2021-05-10 07:08:38 +02:00
parent 9ee2fc8275
commit fef385cd6b
13 changed files with 78 additions and 45 deletions

View file

@ -6,6 +6,8 @@
#include <iostream>
#include <iomanip>
#include "LocalesUtils.hpp"
#include <Shiny/Shiny.h>
namespace Slic3r {
@ -25,6 +27,7 @@ void GCodeReader::apply_config(const DynamicPrintConfig &config)
const char* GCodeReader::parse_line_internal(const char *ptr, GCodeLine &gline, std::pair<const char*, const char*> &command)
{
PROFILE_FUNC();
CNumericLocalesSetter locales_setter; // for strtod
// command and args
const char *c = ptr;
@ -150,6 +153,7 @@ bool GCodeReader::GCodeLine::has(char axis) const
bool GCodeReader::GCodeLine::has_value(char axis, float &value) const
{
CNumericLocalesSetter locales_setter; // for strtod
const char *c = m_raw.c_str();
// Skip the whitespaces.
c = skip_whitespaces(c);