Browse Source

Formatting.

7.0
Jeff Young 3 years ago
parent
commit
7e1fecaf2e
  1. 8
      eeschema/sim/ngspice.cpp
  2. 12
      eeschema/sim/ngspice.h

8
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 <tomasz.wlostowski@cern.ch>
@ -277,9 +277,9 @@ bool NGSPICE::Attach( const std::shared_ptr<SIMULATION_MODEL>& 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<char*> 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;

12
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 <tomasz.wlostowski@cern.ch>
@ -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 */
Loading…
Cancel
Save