Skip to content
Permalink
Browse files

Remove redundant scaling factor (the values are set to a fixed range

shortly after this code executes)
  • Loading branch information
nyalldawson committed Dec 26, 2019
1 parent 49dccd8 commit cb62685e874f015a07181d2f120fba7b8efe0402
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/core/pal/costcalculator.cpp
@@ -116,8 +116,7 @@ void CostCalculator::calculateCandidatePolygonRingDistanceCosts( std::vector< st
double maxCandidateRingDistanceCost = std::numeric_limits< double >::lowest();
for ( std::unique_ptr< LabelPosition > &pos : lPos )
{
// 4* multiplier came from original pal library logic - TODO: evaluate if this is still appropriate
const double candidatePolygonRingDistanceCost = 4 * calculatePolygonRingDistance( pos.get(), obstacles, bbx, bby );
const double candidatePolygonRingDistanceCost = calculatePolygonRingDistance( pos.get(), obstacles, bbx, bby );

minCandidateRingDistanceCost = std::min( minCandidateRingDistanceCost, candidatePolygonRingDistanceCost );
maxCandidateRingDistanceCost = std::max( maxCandidateRingDistanceCost, candidatePolygonRingDistanceCost );

0 comments on commit cb62685

Please sign in to comment.
You can’t perform that action at this time.