Back out unordered_map change for SCH_ITEM.

We're sensitive to the ordering in this one.

Also fixes a problem with the unit tests when KICAD_SPICE=OFF.
This commit is contained in:
Jeff Young 2022-08-03 14:27:02 +01:00
parent e4b6da287f
commit ced55583a6
3 changed files with 25 additions and 19 deletions

View File

@ -418,7 +418,7 @@ int ERC_TESTER::TestNoConnectPins()
}
}
for( auto& pair : pinMap )
for( const std::pair<const VECTOR2I, std::vector<SCH_PIN*>>& pair : pinMap )
{
if( pair.second.size() > 1 )
{

View File

@ -484,7 +484,7 @@ protected:
// to store a initial pos of the item or mouse cursor
/// Store pointers to other items that are connected to this one, per sheet.
std::unordered_map<SCH_SHEET_PATH, SCH_ITEM_SET, SHEET_PATH_HASH, SHEET_PATH_CMP> m_connected_items;
std::map<SCH_SHEET_PATH, SCH_ITEM_SET, SHEET_PATH_CMP> m_connected_items;
/// Store connectivity information, per sheet.
std::unordered_map<SCH_SHEET_PATH, SCH_CONNECTION*> m_connection_map;

View File

@ -85,12 +85,18 @@ public:
{
// Our simulator is actually Ngspice.
NGSPICE* ngspice = dynamic_cast<NGSPICE*>( m_simulator.get() );
if( ngspice )
ngspice->SetReporter( m_reporter.get() );
wxFFile file( GetNetlistPath( true ), "rt" );
wxString netlist;
file.ReadAll( &netlist );
if( ngspice )
{
//ngspice->Init();
ngspice->Command( "set ngbehavior=ps" );
ngspice->Command( "setseed 1" );
@ -111,7 +117,7 @@ public:
ngspice->Command(
wxString::Format( "wrdata %s %s", GetResultsPath( true ), vectors ).ToStdString() );
}
FILE_LINE_READER refReader( GetResultsPath() );
FILE_LINE_READER resultReader( GetResultsPath( true ) );