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

Unified Diff: Source/platform/audio/HRTFKernel.cpp

Issue 511333002: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/audio) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/platform/audio/HRTFElevation.cpp ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/HRTFKernel.cpp
diff --git a/Source/platform/audio/HRTFKernel.cpp b/Source/platform/audio/HRTFKernel.cpp
index 1bc8bd1ca14cef6faca398f654bd290d4ff34dce..8b828f9c3655fbb05c8232bf51433f0406e684e3 100644
--- a/Source/platform/audio/HRTFKernel.cpp
+++ b/Source/platform/audio/HRTFKernel.cpp
@@ -36,8 +36,6 @@
#include "platform/FloatConversion.h"
#include "wtf/MathExtras.h"
-using namespace std;
-
namespace blink {
// Takes the input AudioChannel as an input impulse response and calculates the average group delay.
@@ -80,7 +78,7 @@ HRTFKernel::HRTFKernel(AudioChannel* channel, size_t fftSize, float sampleRate)
size_t responseLength = channel->length();
// We need to truncate to fit into 1/2 the FFT size (with zero padding) in order to do proper convolution.
- size_t truncatedResponseLength = min(responseLength, fftSize / 2); // truncate if necessary to max impulse response length allowed by FFT
+ size_t truncatedResponseLength = std::min(responseLength, fftSize / 2); // truncate if necessary to max impulse response length allowed by FFT
// Quick fade-out (apply window) at truncation point
unsigned numberOfFadeOutFrames = static_cast<unsigned>(sampleRate / 4410); // 10 sample-frames @44.1KHz sample-rate
@@ -116,7 +114,7 @@ PassRefPtr<HRTFKernel> HRTFKernel::createInterpolatedKernel(HRTFKernel* kernel1,
return nullptr;
ASSERT(x >= 0.0 && x < 1.0);
- x = min(1.0f, max(0.0f, x));
+ x = std::min(1.0f, std::max(0.0f, x));
float sampleRate1 = kernel1->sampleRate();
float sampleRate2 = kernel2->sampleRate();
« no previous file with comments | « Source/platform/audio/HRTFElevation.cpp ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698