diff options
Diffstat (limited to 'traffic/speed_groups.cpp')
-rw-r--r-- | traffic/speed_groups.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/traffic/speed_groups.cpp b/traffic/speed_groups.cpp index d32abde9c2..926be45bfd 100644 --- a/traffic/speed_groups.cpp +++ b/traffic/speed_groups.cpp @@ -11,11 +11,10 @@ uint32_t const kSpeedGroupThresholdPercentage[] = {8, 16, 33, 58, 83, 100, 100, SpeedGroup GetSpeedGroupByPercentage(double p) { p = my::clamp(p, 0.0, 100.0); - uint32_t const pu = static_cast<uint32_t>(p); SpeedGroup res = SpeedGroup::Unknown; for (int i = static_cast<int>(SpeedGroup::Count) - 1; i >= 0; --i) { - if (pu <= kSpeedGroupThresholdPercentage[i]) + if (p <= kSpeedGroupThresholdPercentage[i]) res = static_cast<SpeedGroup>(i); } return res; |