Formatting.

This commit is contained in:
Jeff Young 2024-03-11 12:12:13 +00:00
parent 01cb1543bb
commit 73f94175de
1 changed files with 13 additions and 12 deletions

View File

@ -1646,19 +1646,20 @@ void SIM_MODEL::MigrateSimModel( T_symbol& aSymbol, const PROJECT* aProject )
std::vector<LIB_PIN*> sourcePins = aSymbol.GetAllLibPins();
bool sourcePinsSorted = false;
auto lazySortSourcePins = [&sourcePins, &sourcePinsSorted]()
{
if( !sourcePinsSorted )
{
std::sort( sourcePins.begin(), sourcePins.end(),
[]( const LIB_PIN* lhs, const LIB_PIN* rhs )
{
return StrNumCmp( lhs->GetNumber(), rhs->GetNumber(), true ) < 0;
} );
}
auto lazySortSourcePins =
[&sourcePins, &sourcePinsSorted]()
{
if( !sourcePinsSorted )
{
std::sort( sourcePins.begin(), sourcePins.end(),
[]( const LIB_PIN* lhs, const LIB_PIN* rhs )
{
return StrNumCmp( lhs->GetNumber(), rhs->GetNumber(), true ) < 0;
} );
}
sourcePinsSorted = true;
};
sourcePinsSorted = true;
};
FIELD_INFO deviceInfo;
FIELD_INFO modelInfo;