pcbnew: Fix minor counting issue

The evaluation of count_if resulted in a 0 or 1, leading to segment zone
fills always running on single processor and the progress bar showing
incorrect status.  Likely infrequently hit as only affected segment
fills.
This commit is contained in:
Seth Hillbrand 2018-10-06 21:05:04 -07:00
parent 03813b3751
commit 10d348999e
1 changed files with 5 additions and 3 deletions

View File

@ -272,9 +272,11 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*> aZones, bool aCheck )
// If some zones must be filled by segments, create the filling segments
// (note, this is a outdated option, but it exists)
if( int zone_count = std::count_if( toFill.begin(), toFill.end(),
[]( CN_ZONE_ISOLATED_ISLAND_LIST& aList )
{ return aList.m_zone->GetFillMode() == ZFM_SEGMENTS; } ) > 0 )
int zone_count = std::count_if( toFill.begin(), toFill.end(),
[]( CN_ZONE_ISOLATED_ISLAND_LIST& aList )
{ return aList.m_zone->GetFillMode() == ZFM_SEGMENTS; } );
if( zone_count > 0 )
{
if( m_progressReporter )
{