Fix some minor compil and Coverity warnings.

This commit is contained in:
jean-pierre charras 2022-06-05 11:44:49 +02:00
parent 7ed239e740
commit 9f38fa43cd
5 changed files with 10 additions and 10 deletions

View File

@ -428,7 +428,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
int barThickness = underscoreBBox.GetHeight();
// Shorten the bar a little so its rounded ends don't make it over-long
double barTrim = barThickness / 2;
double barTrim = barThickness / 2.0;
VECTOR2I topLeft( aPosition );
VECTOR2I topRight( aPosition );

View File

@ -437,7 +437,6 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
}
int LastReferenceNumber = 0;
int NumberOfUnits, Unit;
/* calculate index of the first symbol with the same reference prefix
* than the current symbol. All symbols having the same reference
@ -518,9 +517,6 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
continue;
}
// Annotation of multi-unit parts ( n units per part ) (complex case)
NumberOfUnits = ref_unit.GetLibPart()->GetUnitCount();
// If this symbol is in aLockedUnitMap, copy the annotation to all
// symbols that are not it
if( lockedList != nullptr )

View File

@ -48,7 +48,8 @@ class NGSPICE_CIRCUIT_MODEL : public NETLIST_EXPORTER_PSPICE, public SIMULATION_
{
public:
NGSPICE_CIRCUIT_MODEL( SCHEMATIC_IFACE* aSchematic ) :
NETLIST_EXPORTER_PSPICE( aSchematic )
NETLIST_EXPORTER_PSPICE( aSchematic ),
m_options( 0 )
{
}
virtual ~NGSPICE_CIRCUIT_MODEL() {}

View File

@ -165,16 +165,17 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
auto annotate =
[&] ()
{
EESCHEMA_SETTINGS::PANEL_ANNOTATE& annotate = m_frame->eeconfig()->m_AnnotatePanel;
EESCHEMA_SETTINGS::PANEL_ANNOTATE& annotate_panel = m_frame->eeconfig()->m_AnnotatePanel;
SCHEMATIC_SETTINGS& projSettings = m_frame->Schematic().Settings();
int annotateStartNum = projSettings.m_AnnotateStartNum;
if( annotate.automatic )
if( annotate_panel.automatic )
{
NULL_REPORTER reporter;
m_frame->AnnotateSymbols( ANNOTATE_SELECTION,
(ANNOTATE_ORDER_T) annotate.sort_order,
(ANNOTATE_ALGO_T) annotate.method, annotate.recursive,
(ANNOTATE_ORDER_T) annotate_panel.sort_order,
(ANNOTATE_ALGO_T) annotate_panel.method,
annotate_panel.recursive,
annotateStartNum, false, false, reporter, true );
}
};

View File

@ -462,6 +462,8 @@ bool ROUTER::Move( const VECTOR2I& aP, ITEM* endItem )
default:
break;
}
return false;
}