From 133fb5cded4f8deda37e2edbbcb76e0d0f2289dd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 6 Sep 2020 11:28:58 +0100 Subject: [PATCH] Minor code cleanup. --- eeschema/files-io.cpp | 2 +- eeschema/sch_sheet_path.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 35e95c10bd..9747237a71 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -487,7 +487,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in screen->UpdateLocalLibSymbolLinks(); // Restore all of the loaded symbol instances from the root sheet screen. - sheetList.UpdateSymbolInstances( Schematic().RootScreen()->m_symbolInstances ); + sheetList.UpdateSymbolInstances( Schematic().RootScreen()->GetSymbolInstances() ); } Schematic().ConnectionGraph()->Reset(); diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index f56d834387..509e60639a 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -257,9 +257,9 @@ void SCH_SHEET_PATH::UpdateAllScreenReferences() void SCH_SHEET_PATH::GetComponents( SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols, bool aForceIncludeOrphanComponents ) const { - for( auto item : LastScreen()->Items().OfType( SCH_COMPONENT_T ) ) + for( SCH_ITEM* item : LastScreen()->Items().OfType( SCH_COMPONENT_T ) ) { - auto component = static_cast( item ); + SCH_COMPONENT* component = static_cast( item ); // Skip pseudo components, which have a reference starting with #. This mainly // affects power symbols. @@ -798,7 +798,7 @@ std::vector SCH_SHEET_LIST::GetPaths() const { std::vector paths; - for( auto sheetPath : *this ) + for( const SCH_SHEET_PATH& sheetPath : *this ) paths.emplace_back( sheetPath.Path() ); return paths; @@ -817,10 +817,10 @@ void SCH_SHEET_LIST::ReplaceLegacySheetPaths( const std::vector& aOld wxCHECK( screen, /* void */ ); - for( auto symbol : screen->Items().OfType( SCH_COMPONENT_T ) ) + for( SCH_ITEM* symbol : screen->Items().OfType( SCH_COMPONENT_T ) ) { static_cast( symbol )->ReplaceInstanceSheetPath( oldSheetPath, - newSheetPath ); + newSheetPath ); } } }