Patch another dynamic_cast-across-compile-unit-boundaries issue.

This commit is contained in:
Jeff Young 2024-05-15 10:54:26 +01:00
parent fa78c24a16
commit 9e1330184c
1 changed files with 3 additions and 7 deletions

View File

@ -320,10 +320,7 @@ void FP_LIB_TABLE::PrefetchLib( const wxString& aNickname )
const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool aCheckIfEnabled )
{
// Do not optimize this code. Is done this way specifically to fix a runtime
// error with clang 4.0.1.
LIB_TABLE_ROW* ltrow = findRow( aNickname, aCheckIfEnabled );
FP_LIB_TABLE_ROW* row = dynamic_cast< FP_LIB_TABLE_ROW* >( ltrow );
FP_LIB_TABLE_ROW* row = static_cast<FP_LIB_TABLE_ROW*>( findRow( aNickname, aCheckIfEnabled ) );
if( !row )
{
@ -333,9 +330,8 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
THROW_IO_ERROR( msg );
}
// We've been 'lazy' up until now, but it cannot be deferred any longer,
// instantiate a PCB_IO of the proper kind if it is not already in this
// FP_LIB_TABLE_ROW.
// We've been 'lazy' up until now, but it cannot be deferred any longer; instantiate a
// PCB_IO of the proper kind if it is not already in this FP_LIB_TABLE_ROW.
if( !row->plugin )
row->setPlugin( PCB_IO_MGR::PluginFind( row->type ) );