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

Unified Diff: third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp

Issue 2730683004: Avoid name collision for secondsPerHour/secondsPerMinute (Closed)
Patch Set: Keep using double Created 3 years, 10 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 | « third_party/WebKit/Source/core/html/MediaFragmentURIParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp b/third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp
index f3e4542db09ffa2ee484574b68cda004d3e22ca4..08e3c2d52332fa095a92abbbe5ab79457aadd5db 100644
--- a/third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp
+++ b/third_party/WebKit/Source/core/html/track/vtt/VTTParser.cpp
@@ -45,9 +45,6 @@ namespace blink {
using namespace HTMLNames;
-const double secondsPerHour = 3600;
-const double secondsPerMinute = 60;
-const double secondsPerMillisecond = 0.001;
const unsigned fileIdentifierLength = 6;
bool VTTParser::parseFloatPercentageValue(VTTScanner& valueScanner,
@@ -442,6 +439,9 @@ bool VTTParser::collectTimeStamp(VTTScanner& input, double& timeStamp) {
return false;
// Steps 18 - 19 - Calculate result.
+ const double secondsPerHour = 3600;
+ const double secondsPerMinute = 60;
+ const double secondsPerMillisecond = 0.001;
timeStamp = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 +
(value4 * secondsPerMillisecond);
return true;
« no previous file with comments | « third_party/WebKit/Source/core/html/MediaFragmentURIParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698