Fix some warnings.

This commit is contained in:
Alex Shvartzkop 2023-10-31 04:25:16 +03:00
parent 3faf3ea27c
commit 3d5721a217
3 changed files with 6 additions and 6 deletions

View File

@ -1931,9 +1931,9 @@ static struct EDA_SHAPE_DESC
auto fillAvailable =
[=]( INSPECTABLE* aItem ) -> bool
{
if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
if( EDA_SHAPE* edaShape = dynamic_cast<EDA_SHAPE*>( aItem ) )
{
switch( shape->GetShape() )
switch( edaShape->GetShape() )
{
case SHAPE_T::POLY:
case SHAPE_T::RECTANGLE:

View File

@ -97,14 +97,14 @@ DIALOG_IMPORT_GFX_SCH::DIALOG_IMPORT_GFX_SCH( SCH_BASE_FRAME* aParent ) :
m_importer = std::make_unique<GRAPHICS_IMPORTER_LIB_SYMBOL>( symFrame->GetCurSymbol(),
symFrame->GetUnit() );
SYMBOL_EDITOR_SETTINGS* cfg = m_parent->libeditconfig();
SYMBOL_EDITOR_SETTINGS* cfg = aParent->libeditconfig();
initWidgetsFromSettings( cfg );
}
else if( SCH_EDIT_FRAME* schFrame = dynamic_cast<SCH_EDIT_FRAME*>( aParent ) )
else if( dynamic_cast<SCH_EDIT_FRAME*>( aParent ) )
{
m_importer = std::make_unique<GRAPHICS_IMPORTER_SCH>();
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
EESCHEMA_SETTINGS* cfg = aParent->eeconfig();
initWidgetsFromSettings( cfg );
}

View File

@ -104,7 +104,7 @@ void ConnectBoardShapes( std::vector<PCB_SHAPE*>& aShapeList,
};
auto min_distance_sq = []( const VECTOR2I& aRef, const VECTOR2I& aFirst,
const VECTOR2I& aSecond ) -> bool
const VECTOR2I& aSecond ) -> SEG::ecoord
{
return std::min( ( aRef - aFirst ).SquaredEuclideanNorm(),
( aRef - aSecond ).SquaredEuclideanNorm() );