Enclose wxCHECK* macros in braces
The macros are if/else statements without enclosing structures which leads to unexpected evaluation when expanding in an existing conditional that does not have braces already.
This commit is contained in:
parent
6d957e9d65
commit
6633eadfc8
|
@ -647,15 +647,25 @@ void WX_VIEW_CONTROLS::onScroll( wxScrollWinEvent& aEvent )
|
|||
double dist = 0;
|
||||
|
||||
if( type == wxEVT_SCROLLWIN_PAGEUP )
|
||||
{
|
||||
dist = pagePanDelta;
|
||||
}
|
||||
else if( type == wxEVT_SCROLLWIN_PAGEDOWN )
|
||||
{
|
||||
dist = -pagePanDelta;
|
||||
}
|
||||
else if( type == wxEVT_SCROLLWIN_LINEUP )
|
||||
{
|
||||
dist = linePanDelta;
|
||||
}
|
||||
else if( type == wxEVT_SCROLLWIN_LINEDOWN )
|
||||
{
|
||||
dist = -linePanDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxCHECK_MSG( false, /* void */, wxT( "Unhandled event type" ) );
|
||||
}
|
||||
|
||||
VECTOR2D scroll = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) * dist;
|
||||
|
||||
|
|
|
@ -625,9 +625,13 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
|||
if( symbol->IsAlias() )
|
||||
{
|
||||
if( LIB_SYMBOL_SPTR parent = symbol->GetRootSymbol() )
|
||||
{
|
||||
symbolToPlot = parent.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxCHECK( false, CLI::EXIT_CODES::ERR_UNKNOWN );
|
||||
}
|
||||
}
|
||||
|
||||
if( aSvgJob->m_includeHiddenPins )
|
||||
|
|
Loading…
Reference in New Issue