Skip to content

Commit

Permalink
Nicer code
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 27, 2019
1 parent df2debc commit 5ecc8d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/pal/pal.cpp
Expand Up @@ -369,10 +369,10 @@ std::unique_ptr<Problem> Pal::extract( const QgsRectangle &extent, const QgsGeom
prob->mTotalCandidates += static_cast< int >( feat->candidates.size() );

// add all candidates into a rtree (to speed up conflicts searching)
for ( std::size_t j = 0; j < feat->candidates.size(); j++, idlp++ )
for ( std::unique_ptr< LabelPosition > &candidate : feat->candidates )
{
feat->candidates[ j ]->insertIntoIndex( prob->allCandidatesIndex() );
feat->candidates[ j ]->setProblemIds( static_cast< int >( i ), idlp );
candidate->insertIntoIndex( prob->allCandidatesIndex() );
candidate->setProblemIds( static_cast< int >( i ), idlp++ );
}
features.emplace_back( std::move( feat ) );
}
Expand Down

0 comments on commit 5ecc8d5

Please sign in to comment.