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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | « Source/modules/webaudio/PeriodicWave.cpp ('k') | Source/modules/webdatabase/DOMWindowWebDatabase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ScriptProcessorNode.cpp
diff --git a/Source/modules/webaudio/ScriptProcessorNode.cpp b/Source/modules/webaudio/ScriptProcessorNode.cpp
index 772675252fb59c049b6df01bdcca883d477adf00..79c446c96f432d7f6cfed6d71feae697b7e15993 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -72,17 +72,17 @@ PassRefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* contex
case 16384:
break;
default:
- return 0;
+ return nullptr;
}
if (!numberOfInputChannels && !numberOfOutputChannels)
- return 0;
+ return nullptr;
if (numberOfInputChannels > AudioContext::maxNumberOfChannels())
- return 0;
+ return nullptr;
if (numberOfOutputChannels > AudioContext::maxNumberOfChannels())
- return 0;
+ return nullptr;
return adoptRef(new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
}
@@ -128,8 +128,8 @@ void ScriptProcessorNode::initialize()
// Create double buffers on both the input and output sides.
// These AudioBuffers will be directly accessed in the main thread by JavaScript.
for (unsigned i = 0; i < 2; ++i) {
- RefPtr<AudioBuffer> inputBuffer = m_numberOfInputChannels ? AudioBuffer::create(m_numberOfInputChannels, bufferSize(), sampleRate) : 0;
- RefPtr<AudioBuffer> outputBuffer = m_numberOfOutputChannels ? AudioBuffer::create(m_numberOfOutputChannels, bufferSize(), sampleRate) : 0;
+ RefPtr<AudioBuffer> inputBuffer = m_numberOfInputChannels ? AudioBuffer::create(m_numberOfInputChannels, bufferSize(), sampleRate) : nullptr;
+ RefPtr<AudioBuffer> outputBuffer = m_numberOfOutputChannels ? AudioBuffer::create(m_numberOfOutputChannels, bufferSize(), sampleRate) : nullptr;
m_inputBuffers.append(inputBuffer);
m_outputBuffers.append(outputBuffer);
« no previous file with comments | « Source/modules/webaudio/PeriodicWave.cpp ('k') | Source/modules/webdatabase/DOMWindowWebDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698