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;
|
double dist = 0;
|
||||||
|
|
||||||
if( type == wxEVT_SCROLLWIN_PAGEUP )
|
if( type == wxEVT_SCROLLWIN_PAGEUP )
|
||||||
|
{
|
||||||
dist = pagePanDelta;
|
dist = pagePanDelta;
|
||||||
|
}
|
||||||
else if( type == wxEVT_SCROLLWIN_PAGEDOWN )
|
else if( type == wxEVT_SCROLLWIN_PAGEDOWN )
|
||||||
|
{
|
||||||
dist = -pagePanDelta;
|
dist = -pagePanDelta;
|
||||||
|
}
|
||||||
else if( type == wxEVT_SCROLLWIN_LINEUP )
|
else if( type == wxEVT_SCROLLWIN_LINEUP )
|
||||||
|
{
|
||||||
dist = linePanDelta;
|
dist = linePanDelta;
|
||||||
|
}
|
||||||
else if( type == wxEVT_SCROLLWIN_LINEDOWN )
|
else if( type == wxEVT_SCROLLWIN_LINEDOWN )
|
||||||
|
{
|
||||||
dist = -linePanDelta;
|
dist = -linePanDelta;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxCHECK_MSG( false, /* void */, wxT( "Unhandled event type" ) );
|
wxCHECK_MSG( false, /* void */, wxT( "Unhandled event type" ) );
|
||||||
|
}
|
||||||
|
|
||||||
VECTOR2D scroll = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) * dist;
|
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( symbol->IsAlias() )
|
||||||
{
|
{
|
||||||
if( LIB_SYMBOL_SPTR parent = symbol->GetRootSymbol() )
|
if( LIB_SYMBOL_SPTR parent = symbol->GetRootSymbol() )
|
||||||
|
{
|
||||||
symbolToPlot = parent.get();
|
symbolToPlot = parent.get();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
wxCHECK( false, CLI::EXIT_CODES::ERR_UNKNOWN );
|
wxCHECK( false, CLI::EXIT_CODES::ERR_UNKNOWN );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aSvgJob->m_includeHiddenPins )
|
if( aSvgJob->m_includeHiddenPins )
|
||||||
|
|
Loading…
Reference in New Issue