Shrink lifetime of variable
In 7.0, this avoids a warning. In this branch, someone implemented the compiler's suggestion, but there is an easier way.
This commit is contained in:
parent
f1db501adb
commit
08e6458abc
|
@ -921,12 +921,10 @@ int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent )
|
|||
KIWAY& kiway = m_frame->Kiway();
|
||||
|
||||
// Reset state containing global lib tables
|
||||
KIFACE* kiface;
|
||||
|
||||
if( ( kiface = kiway.KiFACE( KIWAY::FACE_SCH, false ) ) )
|
||||
if( KIFACE* kiface = kiway.KiFACE( KIWAY::FACE_SCH, false ) )
|
||||
kiface->Reset();
|
||||
|
||||
if( ( kiface = kiway.KiFACE( KIWAY::FACE_PCB, false ) ) )
|
||||
if( KIFACE* kiface = kiway.KiFACE( KIWAY::FACE_PCB, false ) )
|
||||
kiface->Reset();
|
||||
|
||||
// Reload lib tables
|
||||
|
|
Loading…
Reference in New Issue