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

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

Issue 906233002: Use nullptr instead of 0 in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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/platform/audio/AudioArray.h ('k') | Source/platform/audio/AudioChannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/audio/AudioBus.cpp
diff --git a/Source/platform/audio/AudioBus.cpp b/Source/platform/audio/AudioBus.cpp
index 06459af88102084b89466495a78134d08dc0632f..caca83fa2fcbae5d2e95c0af7b0b5642f6d39995 100644
--- a/Source/platform/audio/AudioBus.cpp
+++ b/Source/platform/audio/AudioBus.cpp
@@ -103,19 +103,19 @@ AudioChannel* AudioBus::channelByType(unsigned channelType)
{
// For now we only support canonical channel layouts...
if (m_layout != LayoutCanonical)
- return 0;
+ return nullptr;
switch (numberOfChannels()) {
case 1: // mono
if (channelType == ChannelMono || channelType == ChannelLeft)
return channel(0);
- return 0;
+ return nullptr;
case 2: // stereo
switch (channelType) {
case ChannelLeft: return channel(0);
case ChannelRight: return channel(1);
- default: return 0;
+ default: return nullptr;
}
case 4: // quad
@@ -124,7 +124,7 @@ AudioChannel* AudioBus::channelByType(unsigned channelType)
case ChannelRight: return channel(1);
case ChannelSurroundLeft: return channel(2);
case ChannelSurroundRight: return channel(3);
- default: return 0;
+ default: return nullptr;
}
case 5: // 5.0
@@ -134,7 +134,7 @@ AudioChannel* AudioBus::channelByType(unsigned channelType)
case ChannelCenter: return channel(2);
case ChannelSurroundLeft: return channel(3);
case ChannelSurroundRight: return channel(4);
- default: return 0;
+ default: return nullptr;
}
case 6: // 5.1
@@ -145,12 +145,12 @@ AudioChannel* AudioBus::channelByType(unsigned channelType)
case ChannelLFE: return channel(3);
case ChannelSurroundLeft: return channel(4);
case ChannelSurroundRight: return channel(5);
- default: return 0;
+ default: return nullptr;
}
}
ASSERT_NOT_REACHED();
- return 0;
+ return nullptr;
}
const AudioChannel* AudioBus::channelByType(unsigned type) const
« no previous file with comments | « Source/platform/audio/AudioArray.h ('k') | Source/platform/audio/AudioChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698