Skip to content

Commit

Permalink
Remove redundant operations from PathCost private constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmamrak authored May 20, 2024
1 parent 9c1bdb3 commit 3123c40
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/central64/grid/PathCost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ constexpr PathCost::PathCost(double distance)
}

constexpr PathCost::PathCost(int64_t multiplier, int)
: multiplier_{ (multiplier >= 0) ? (multiplier >= max) ? max :
int64_t(multiplier + 0.5) :
(multiplier <= -max) ? -max :
-int64_t(-multiplier + 0.5) }
: multiplier_{ (multiplier >= max) ? max :
(multiplier <= -max) ? -max :
multiplier }
{
}

Expand Down

0 comments on commit 3123c40

Please sign in to comment.