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

Unified Diff: base/time/time.h

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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 | « base/threading/platform_thread_win.cc ('k') | base/time/time_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index d6f6f52663a8a4665a7a3861b6be8ae9b5c1125e..3cf3746166ed8dc16cc937945d0918cfe6ef8ede 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -538,7 +538,7 @@ inline TimeDelta TimeDelta::FromSecondsD(double secs) {
// Preserve max to prevent overflow.
if (secs == std::numeric_limits<double>::infinity())
return Max();
- return TimeDelta(secs * Time::kMicrosecondsPerSecond);
+ return TimeDelta(static_cast<int64>(secs * Time::kMicrosecondsPerSecond));
}
// static
@@ -546,7 +546,7 @@ inline TimeDelta TimeDelta::FromMillisecondsD(double ms) {
// Preserve max to prevent overflow.
if (ms == std::numeric_limits<double>::infinity())
return Max();
- return TimeDelta(ms * Time::kMicrosecondsPerMillisecond);
+ return TimeDelta(static_cast<int64>(ms * Time::kMicrosecondsPerMillisecond));
}
// static
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698