This commit is contained in:
Moritz Kobitzsch 2016-05-16 13:37:00 +02:00 committed by Patrick Niklaus
parent a322e27e05
commit d150df1c5c
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B

View File

@ -247,12 +247,14 @@ inline bool isConflict(const TurnInstruction first, const TurnInstruction second
inline DiscreteAngle discretizeAngle(const double angle)
{
BOOST_ASSERT(angle >= 0. && angle <= 360.);
return DiscreteAngle(static_cast<std::uint8_t>((angle + 0.5 *detail::discrete_angle_step_size) / detail::discrete_angle_step_size));
return DiscreteAngle(static_cast<std::uint8_t>(
(angle + 0.5 * detail::discrete_angle_step_size) / detail::discrete_angle_step_size));
}
inline double angleFromDiscreteAngle(const DiscreteAngle angle)
{
return static_cast<double>(angle) * detail::discrete_angle_step_size + 0.5 * detail::discrete_angle_step_size;
return static_cast<double>(angle) * detail::discrete_angle_step_size +
0.5 * detail::discrete_angle_step_size;
}
inline double getAngularPenalty(const double angle, DirectionModifier modifier)
@ -326,8 +328,8 @@ inline bool requiresNameAnnounced(const std::string &from,
const std::string &to,
const SuffixTable &suffix_table)
{
//first is empty and the second is not
if(from.empty() && !to.empty())
// first is empty and the second is not
if (from.empty() && !to.empty())
return true;
// FIXME, handle in profile to begin with?
@ -389,7 +391,8 @@ inline bool requiresNameAnnounced(const std::string &from,
if (!checkTable(first_prefix_and_suffixes.second))
return false;
return !first.compare(0, first.length() - first_prefix_and_suffixes.second.length(),
second, 0, second.length() - second_prefix_and_suffixes.second.length());
second, 0,
second.length() - second_prefix_and_suffixes.second.length());
}();
return is_prefix_change || is_suffix_change;