command_export_pcb_dxf.cpp: switch to "C" locale before exporting the file

Fix also a minor Coverity warning
This commit is contained in:
jean-pierre charras 2022-10-29 09:45:45 +02:00
parent fd592abddd
commit 50d2237f06
2 changed files with 6 additions and 2 deletions

View File

@ -29,6 +29,8 @@
#include <macros.h> #include <macros.h>
#include <wx/tokenzr.h> #include <wx/tokenzr.h>
#include <locale_io.h>
#define ARG_LAYERS "--layers" #define ARG_LAYERS "--layers"
#define ARG_INCLUDE_REFDES "--include-refdes" #define ARG_INCLUDE_REFDES "--include-refdes"
#define ARG_INCLUDE_VALUE "--include-value" #define ARG_INCLUDE_VALUE "--include-value"
@ -101,6 +103,7 @@ int CLI::EXPORT_PCB_DXF_COMMAND::Perform( KIWAY& aKiway ) const
dxfJob->m_printMaskLayer = layerMask; dxfJob->m_printMaskLayer = layerMask;
LOCALE_IO dummy; // Switch to "C" locale
int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, dxfJob.get() ); int exitCode = aKiway.ProcessJob( KIWAY::FACE_PCB, dxfJob.get() );
return exitCode; return exitCode;

View File

@ -221,6 +221,7 @@ std::string SPICE_GENERATOR_KIBIS::IbisDevice( const SPICE_ITEM& aItem, const st
SIM_MODEL_KIBIS::SIM_MODEL_KIBIS( TYPE aType ) : SIM_MODEL_KIBIS::SIM_MODEL_KIBIS( TYPE aType ) :
SIM_MODEL( aType, std::make_unique<SPICE_GENERATOR_KIBIS>( *this ) ), SIM_MODEL( aType, std::make_unique<SPICE_GENERATOR_KIBIS>( *this ) ),
m_enableDiff( false ),
m_sourceModel( nullptr ) m_sourceModel( nullptr )
{ {
static std::vector<PARAM::INFO> device = makeParamInfos( TYPE::KIBIS_DEVICE ); static std::vector<PARAM::INFO> device = makeParamInfos( TYPE::KIBIS_DEVICE );