mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Formatting.
This commit is contained in:
parent
f4b1a15cd8
commit
1b81f78152
@ -366,6 +366,7 @@ std::set<wxString>::iterator FindByFirstNFields( std::set<wxString>& strSet, con
|
||||
{
|
||||
if( searchPrefix[pos] == delimiter )
|
||||
delimiterCount++;
|
||||
|
||||
pos++;
|
||||
}
|
||||
|
||||
@ -375,9 +376,7 @@ std::set<wxString>::iterator FindByFirstNFields( std::set<wxString>& strSet, con
|
||||
for( auto it = strSet.begin(); it != strSet.end(); ++it )
|
||||
{
|
||||
if( it->StartsWith( searchPrefix + delimiter ) || *it == searchPrefix )
|
||||
{
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
return strSet.end();
|
||||
@ -400,24 +399,20 @@ std::vector<PCB_MARKER*> BOARD::ResolveDRCExclusions( bool aCreateMarkers )
|
||||
if( !serialized.Contains( "unconnected_items" ) )
|
||||
{
|
||||
it = exclusions.find( serialized );
|
||||
|
||||
if( it != exclusions.end() )
|
||||
{
|
||||
matchedExclusion = *it;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const int numberOfFieldsExcludingIds = 3;
|
||||
const char delimiter = '|';
|
||||
it = FindByFirstNFields( exclusions, serialized, delimiter, numberOfFieldsExcludingIds );
|
||||
|
||||
if( it != exclusions.end() )
|
||||
{
|
||||
matchedExclusion = *it;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if( it != exclusions.end() )
|
||||
{
|
||||
marker->SetExcluded( true, comments[matchedExclusion] );
|
||||
@ -439,13 +434,12 @@ std::vector<PCB_MARKER*> BOARD::ResolveDRCExclusions( bool aCreateMarkers )
|
||||
PCB_MARKER* marker = PCB_MARKER::DeserializeFromString( serialized );
|
||||
|
||||
if( !marker )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<KIID> ids = marker->GetRCItem()->GetIDs();
|
||||
|
||||
int uuidCount = 0;
|
||||
|
||||
for( const KIID& uuid : ids )
|
||||
{
|
||||
if( uuidCount < 1 || uuid != niluuid )
|
||||
@ -1076,7 +1070,8 @@ void BOARD::CacheTriangulation( PROGRESS_REPORTER* aReporter, const std::vector<
|
||||
|
||||
returns.reserve( zones.size() );
|
||||
|
||||
auto cache_zones = [aReporter]( ZONE* aZone ) -> size_t
|
||||
auto cache_zones =
|
||||
[aReporter]( ZONE* aZone ) -> size_t
|
||||
{
|
||||
if( aReporter && aReporter->IsCancelled() )
|
||||
return 0;
|
||||
@ -2457,8 +2452,7 @@ BOARD_STACKUP BOARD::GetStackupOrDefault() const
|
||||
|
||||
std::tuple<int, double, double, double, double> BOARD::GetTrackLength( const PCB_TRACK& aTrack ) const
|
||||
{
|
||||
auto connectivity = GetBoard()->GetConnectivity();
|
||||
|
||||
std::shared_ptr<CONNECTIVITY_DATA> connectivity = GetBoard()->GetConnectivity();
|
||||
std::vector<LENGTH_DELAY_CALCULATION_ITEM> items;
|
||||
|
||||
for( BOARD_CONNECTED_ITEM* boardItem : connectivity->GetConnectedItems( &aTrack, EXCLUDE_ZONES ) )
|
||||
@ -2675,7 +2669,7 @@ std::set<KIFONT::OUTLINE_FONT*> BOARD::GetFonts() const
|
||||
continue;
|
||||
|
||||
using EMBEDDING_PERMISSION = KIFONT::OUTLINE_FONT::EMBEDDING_PERMISSION;
|
||||
auto* outline = static_cast<KIFONT::OUTLINE_FONT*>( font );
|
||||
KIFONT::OUTLINE_FONT* outline = static_cast<KIFONT::OUTLINE_FONT*>( font );
|
||||
|
||||
if( outline->GetEmbeddingPermission() == EMBEDDING_PERMISSION::EDITABLE
|
||||
|| outline->GetEmbeddingPermission() == EMBEDDING_PERMISSION::INSTALLABLE )
|
||||
@ -2695,7 +2689,7 @@ void BOARD::EmbedFonts()
|
||||
|
||||
for( KIFONT::OUTLINE_FONT* font : fonts )
|
||||
{
|
||||
auto file = GetEmbeddedFiles()->AddFile( font->GetFileName(), false );
|
||||
EMBEDDED_FILES::EMBEDDED_FILE* file = GetEmbeddedFiles()->AddFile( font->GetFileName(), false );
|
||||
file->type = EMBEDDED_FILES::EMBEDDED_FILE::FILE_TYPE::FONT;
|
||||
}
|
||||
}
|
||||
|
@ -111,11 +111,17 @@ wxString PCB_MARKER::SerializeToString() const
|
||||
else if( m_rcItem->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
|
||||
{
|
||||
PCB_LAYER_ID layer = m_layer;
|
||||
|
||||
if( m_layer == UNDEFINED_LAYER )
|
||||
layer = F_Cu;
|
||||
|
||||
return wxString::Format( wxT( "%s|%d|%d|%s|%d|%s|%s" ), m_rcItem->GetSettingsKey(), m_Pos.x, m_Pos.y,
|
||||
LayerName( layer ), GetMarkerType(), m_rcItem->GetMainItemID().AsString(),
|
||||
return wxString::Format( wxT( "%s|%d|%d|%s|%d|%s|%s" ),
|
||||
m_rcItem->GetSettingsKey(),
|
||||
m_Pos.x,
|
||||
m_Pos.y,
|
||||
LayerName( layer ),
|
||||
GetMarkerType(),
|
||||
m_rcItem->GetMainItemID().AsString(),
|
||||
m_rcItem->GetAuxItemID().AsString() );
|
||||
}
|
||||
else if( m_rcItem->GetErrorCode() == DRCE_STARVED_THERMAL )
|
||||
@ -184,15 +190,11 @@ PCB_MARKER* PCB_MARKER::DeserializeFromString( const wxString& data )
|
||||
}
|
||||
else if( drcItem->GetErrorCode() == DRCE_UNCONNECTED_ITEMS )
|
||||
{
|
||||
// Pre-9.0.3 versions didn't have KIIDs as last two properties to allow sorting stability
|
||||
// Pre-9.0.4 versions didn't have KIIDs as last two properties to allow sorting stability
|
||||
if( props.size() < 6 )
|
||||
{
|
||||
drcItem->SetItems( KIID( props[3] ), KIID( props[4] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
drcItem->SetItems( KIID( props[5] ), KIID( props[6] ) );
|
||||
}
|
||||
}
|
||||
else if( drcItem->GetErrorCode() == DRCE_STARVED_THERMAL )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user