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

Unified Diff: base/time_win.cc

Issue 7977003: Relanding precompiled header support for VS 2008, now enabled for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments per review comments. Created 9 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 | « no previous file | build/win_precompile.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_win.cc
diff --git a/base/time_win.cc b/base/time_win.cc
index 9bb04de7a47d19e1eabffd7343d2e90b6cba5405..9e6fe537741bf09cd71e89100b6571999da648da 100644
--- a/base/time_win.cc
+++ b/base/time_win.cc
@@ -363,7 +363,12 @@ class HighResNowSingleton {
if (!IsUsingHighResClock())
return 0;
- return abs((UnreliableNow() - ReliableNow()) - skew_);
+ // The static_cast<long> is needed as a hint to VS 2008 to tell it
+ // which version of abs() to use. Other compilers don't seem to
+ // need it, including VS 2010, but to keep code identical we use it
+ // everywhere.
+ // TODO(joi): Remove the hint if/when we no longer support VS 2008.
+ return abs(static_cast<long>((UnreliableNow() - ReliableNow()) - skew_));
}
private:
« no previous file with comments | « no previous file | build/win_precompile.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698