mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Fix a compil issue with gcc12.2 and Coverity warnings.
This commit is contained in:
parent
365c7be4ed
commit
b05b33a9ff
@ -2,7 +2,7 @@
|
|||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||||
* Copyright (C) 2012 KiCad Developers, see AUTHORS.TXT for contributors.
|
* Copyright (C) 2023 KiCad Developers, see AUTHORS.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@ -171,7 +171,7 @@ bool PAGE_INFO::SetType( const wxString& aType, bool aIsPortrait )
|
|||||||
if( aIsPortrait )
|
if( aIsPortrait )
|
||||||
{
|
{
|
||||||
// all private PAGE_INFOs are landscape, must swap x and y
|
// all private PAGE_INFOs are landscape, must swap x and y
|
||||||
m_size = VECTOR2I( m_size.y, m_size.x );
|
std::swap( m_size.y, m_size.x );
|
||||||
updatePortrait();
|
updatePortrait();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ void PAGE_INFO::SetPortrait( bool aIsPortrait )
|
|||||||
if( m_portrait != aIsPortrait )
|
if( m_portrait != aIsPortrait )
|
||||||
{
|
{
|
||||||
// swap x and y in m_size
|
// swap x and y in m_size
|
||||||
m_size = VECTOR2I( m_size.y, m_size.x );
|
std::swap( m_size.y, m_size.x );
|
||||||
|
|
||||||
m_portrait = aIsPortrait;
|
m_portrait = aIsPortrait;
|
||||||
|
|
||||||
|
@ -278,7 +278,9 @@ class MEASUREMENTS_GRID_TRICKS : public GRID_TRICKS
|
|||||||
public:
|
public:
|
||||||
MEASUREMENTS_GRID_TRICKS( SIM_PLOT_FRAME* aParent, WX_GRID* aGrid ) :
|
MEASUREMENTS_GRID_TRICKS( SIM_PLOT_FRAME* aParent, WX_GRID* aGrid ) :
|
||||||
GRID_TRICKS( aGrid ),
|
GRID_TRICKS( aGrid ),
|
||||||
m_parent( aParent )
|
m_parent( aParent ),
|
||||||
|
m_menuRow( 0 ),
|
||||||
|
m_menuCol( 0 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -389,7 +389,7 @@ int SIMULATOR_CONTROL::ShowNetlist( const TOOL_EVENT& aEvent )
|
|||||||
m_circuitModel->SetSimOptions( m_plotFrame->GetCurrentOptions() );
|
m_circuitModel->SetSimOptions( m_plotFrame->GetCurrentOptions() );
|
||||||
m_circuitModel->GetNetlist( &formatter, reporter );
|
m_circuitModel->GetNetlist( &formatter, reporter );
|
||||||
|
|
||||||
NETLIST_VIEW_DIALOG dlg( m_plotFrame, errors.IsEmpty() ? formatter.GetString() : errors );
|
NETLIST_VIEW_DIALOG dlg( m_plotFrame, errors.IsEmpty() ? wxString( formatter.GetString() ) : errors );
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user