diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp index 778cce75e7..39a75d3068 100644 --- a/eeschema/sim/ngspice.cpp +++ b/eeschema/sim/ngspice.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2016-2018 CERN + * Copyright (C) 2016-2022 CERN * Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors. * * @author Tomasz Wlostowski @@ -277,9 +277,9 @@ bool NGSPICE::Attach( const std::shared_ptr& aModel, REPORTER& bool NGSPICE::LoadNetlist( const string& aNetlist ) { - LOCALE_IO c_locale; // ngspice works correctly only with C locale + LOCALE_IO c_locale; // ngspice works correctly only with C locale vector lines; - stringstream ss( aNetlist ); + stringstream ss( aNetlist ); m_netlist = ""; @@ -296,7 +296,7 @@ bool NGSPICE::LoadNetlist( const string& aNetlist ) Command( "remcirc" ); bool success = !m_ngSpice_Circ( lines.data() ); - for( auto line : lines ) + for( char* line : lines ) free( line ); return success; diff --git a/eeschema/sim/ngspice.h b/eeschema/sim/ngspice.h index 78b17ec7cb..1b8bd2b85e 100644 --- a/eeschema/sim/ngspice.h +++ b/eeschema/sim/ngspice.h @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2016 CERN + * Copyright (C) 2016-2022 CERN * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors. * * @author Tomasz Wlostowski @@ -155,14 +155,12 @@ private: // Assure ngspice is in a valid state and reinitializes it if need be. void validate(); - ///< Error flag indicating that ngspice needs to be reloaded. - bool m_error; +private: + bool m_error; ///< Error flag indicating that ngspice needs to be reloaded. - ///< Ngspice should be initialized only once. - static bool m_initialized; + static bool m_initialized; ///< Ngspice should be initialized only once. - ///< Current netlist - std::string m_netlist; + std::string m_netlist; ///< Current netlist }; #endif /* NGSPICE_H */