Browse Source

Fix minor compil warnings.

newinvert
jean-pierre charras 2 years ago
parent
commit
c9d6e79d2d
  1. 4
      gerbview/widgets/layer_widget.cpp
  2. 6
      pcbnew/generators/pcb_generator_meanders.cpp
  3. 6
      pcbnew/ratsnest/ratsnest_view_item.cpp

4
gerbview/widgets/layer_widget.cpp

@ -583,7 +583,7 @@ wxSize LAYER_WIDGET::GetBestSize() const
wxArrayInt widths = m_LayersFlexGridSizer->GetColWidths();
int totWidth = 0;
for( int i = 0; i < LYR_COLUMN_COUNT && i < widths.GetCount(); ++i )
for( int i = 0; i < LYR_COLUMN_COUNT && i < (int)widths.GetCount(); ++i )
totWidth += widths[i];
// Account for the parent's frame:
@ -602,7 +602,7 @@ wxSize LAYER_WIDGET::GetBestSize() const
widths = m_RenderFlexGridSizer->GetColWidths();
totWidth = 0;
for( int i = 0; i < RND_COLUMN_COUNT && i < widths.GetCount(); ++i )
for( int i = 0; i < RND_COLUMN_COUNT && i < (int)widths.GetCount(); ++i )
totWidth += widths[i];
// account for the parent's frame, this one has void space of 10 PLUS a border:

6
pcbnew/generators/pcb_generator_meanders.cpp

@ -204,7 +204,7 @@ public:
}
bool baselineValid() { return m_baseLine && m_baseLine->PointCount() > 1; }
void EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard, PCB_BASE_EDIT_FRAME* aFrame,
BOARD_COMMIT* aCommit ) override
{
@ -335,7 +335,7 @@ public:
snapToNearestTrackPoint( m_end, aBoard, netCode );
VECTOR2I startSnapPoint, endSnapPoint;
PNS::LINKED_ITEM* startItem = PickSegment( router, m_origin, nullptr, layer, startSnapPoint );
PNS::LINKED_ITEM* endItem = PickSegment( router, m_end, nullptr, layer, endSnapPoint );
@ -976,7 +976,7 @@ public:
m_baseLine = *baseLine;
}
void ShowPropertiesDialog( PCB_BASE_EDIT_FRAME* aEditFrame )
void ShowPropertiesDialog( PCB_BASE_EDIT_FRAME* aEditFrame ) override
{
PNS::MEANDER_SETTINGS settings = ToMeanderSettings();

6
pcbnew/ratsnest/ratsnest_view_item.cpp

@ -110,12 +110,12 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
}
auto adjustColor =
[&]( COLOR4D& color, double brightnessDelta, double alpha )
[&]( COLOR4D& color_base, double brightnessDelta, double alpha )
{
if( rs->GetColor( nullptr, LAYER_PCB_BACKGROUND ).GetBrightness() < 0.5 )
return color.Brightened( brightnessDelta ).WithAlpha( std::min( alpha, 1.0 ) );
return color_base.Brightened( brightnessDelta ).WithAlpha( std::min( alpha, 1.0 ) );
else
return color.Darkened( brightnessDelta ).WithAlpha( std::min( alpha, 1.0 ) );
return color_base.Darkened( brightnessDelta ).WithAlpha( std::min( alpha, 1.0 ) );
};
const bool curved_ratsnest = cfg->m_Display.m_DisplayRatsnestLinesCurved;

Loading…
Cancel
Save