| Index: ui/events/gesture_detection/velocity_tracker.cc
|
| diff --git a/ui/events/gesture_detection/velocity_tracker.cc b/ui/events/gesture_detection/velocity_tracker.cc
|
| index a3fd83e2e22247b6f9c77e04c10b39e65246c678..68060f955f92370be4bb6583c5ad1ec66a4aea67 100644
|
| --- a/ui/events/gesture_detection/velocity_tracker.cc
|
| +++ b/ui/events/gesture_detection/velocity_tracker.cc
|
| @@ -594,7 +594,7 @@ bool LeastSquaresVelocityTrackerStrategy::GetEstimator(
|
| x[m] = position.x;
|
| y[m] = position.y;
|
| w[m] = ChooseWeight(index);
|
| - time[m] = -age.InSecondsF();
|
| + time[m] = -static_cast<float>(age.InSecondsF());
|
| index = (index == 0 ? HISTORY_SIZE : index) - 1;
|
| } while (++m < HISTORY_SIZE);
|
|
|
| @@ -645,7 +645,7 @@ float LeastSquaresVelocityTrackerStrategy::ChooseWeight(uint32_t index) const {
|
| if (delta_millis < 0)
|
| return 0.5f;
|
| if (delta_millis < 10)
|
| - return 0.5f + delta_millis * 0.05;
|
| + return 0.5f + delta_millis * 0.05f;
|
|
|
| return 1.0f;
|
| }
|
| @@ -663,11 +663,11 @@ float LeastSquaresVelocityTrackerStrategy::ChooseWeight(uint32_t index) const {
|
| if (age_millis < 0)
|
| return 0.5f;
|
| if (age_millis < 10)
|
| - return 0.5f + age_millis * 0.05;
|
| + return 0.5f + age_millis * 0.05f;
|
| if (age_millis < 50)
|
| return 1.0f;
|
| if (age_millis < 60)
|
| - return 0.5f + (60 - age_millis) * 0.05;
|
| + return 0.5f + (60 - age_millis) * 0.05f;
|
|
|
| return 0.5f;
|
| }
|
|
|