Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: media/cast/common/clock_drift_smoother.cc

Issue 638123004: Type conversion fixes, media/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/cast_defines.h ('k') | media/cast/logging/log_serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/common/clock_drift_smoother.cc
diff --git a/media/cast/common/clock_drift_smoother.cc b/media/cast/common/clock_drift_smoother.cc
index aff9a396de0ffd521d60e528e2fc6f10bf3a210b..df3ffdb77c5b7617f089f921d0e89dd325f828d3 100644
--- a/media/cast/common/clock_drift_smoother.cc
+++ b/media/cast/common/clock_drift_smoother.cc
@@ -27,7 +27,7 @@ void ClockDriftSmoother::Reset(base::TimeTicks now,
base::TimeDelta measured_offset) {
DCHECK(!now.is_null());
last_update_time_ = now;
- estimate_us_ = measured_offset.InMicroseconds();
+ estimate_us_ = static_cast<double>(measured_offset.InMicroseconds());
}
void ClockDriftSmoother::Update(base::TimeTicks now,
@@ -39,7 +39,8 @@ void ClockDriftSmoother::Update(base::TimeTicks now,
// |now| is not monotonically non-decreasing.
NOTREACHED();
} else {
- const double elapsed_us = (now - last_update_time_).InMicroseconds();
+ const double elapsed_us =
+ static_cast<double>((now - last_update_time_).InMicroseconds());
last_update_time_ = now;
const double weight =
elapsed_us / (elapsed_us + time_constant_.InMicroseconds());
« no previous file with comments | « media/cast/cast_defines.h ('k') | media/cast/logging/log_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698