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

Unified Diff: Source/modules/webaudio/AudioParamTimeline.cpp

Issue 363613003: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/modules/webaudio/AudioNodeInput.cpp ('k') | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioParamTimeline.cpp
diff --git a/Source/modules/webaudio/AudioParamTimeline.cpp b/Source/modules/webaudio/AudioParamTimeline.cpp
index eb107c04c1a19c710f52017ed26115d6d755e064..dfcae11f3c9f6ec00af971142eaac51803ab2a9c 100644
--- a/Source/modules/webaudio/AudioParamTimeline.cpp
+++ b/Source/modules/webaudio/AudioParamTimeline.cpp
@@ -36,8 +36,6 @@
#include "wtf/MathExtras.h"
#include <algorithm>
-using namespace std;
-
namespace WebCore {
void AudioParamTimeline::setValueAtTime(float value, double time)
@@ -199,9 +197,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
// until we reach the first event time.
double firstEventTime = m_events[0].time();
if (firstEventTime > startTime) {
- double fillToTime = min(endTime, firstEventTime);
+ double fillToTime = std::min(endTime, firstEventTime);
unsigned fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
- fillToFrame = min(fillToFrame, numberOfValues);
+ fillToFrame = std::min(fillToFrame, numberOfValues);
for (; writeIndex < fillToFrame; ++writeIndex)
values[writeIndex] = defaultValue;
@@ -232,9 +230,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
float k = deltaTime > 0 ? 1 / deltaTime : 0;
double sampleFrameTimeIncr = 1 / sampleRate;
- double fillToTime = min(endTime, time2);
+ double fillToTime = std::min(endTime, time2);
unsigned fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
- fillToFrame = min(fillToFrame, numberOfValues);
+ fillToFrame = std::min(fillToFrame, numberOfValues);
ParamEvent::Type nextEventType = nextEvent ? static_cast<ParamEvent::Type>(nextEvent->type()) : ParamEvent::LastType /* unknown */;
@@ -326,9 +324,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
// instead of the next event time.
unsigned nextEventFillToFrame = fillToFrame;
float nextEventFillToTime = fillToTime;
- fillToTime = min(endTime, time1 + duration);
+ fillToTime = std::min(endTime, time1 + duration);
fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
- fillToFrame = min(fillToFrame, numberOfValues);
+ fillToFrame = std::min(fillToFrame, numberOfValues);
// Index into the curve data using a floating-point value.
// We're scaling the number of curve points by the duration (see curvePointsPerFrame).
« no previous file with comments | « Source/modules/webaudio/AudioNodeInput.cpp ('k') | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698