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

Unified Diff: webrtc/sound/alsasoundsystem.cc

Issue 1405023016: Convert usage of ARRAY_SIZE to arraysize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: static_cast<int> Created 5 years, 1 month 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 | « webrtc/p2p/base/transportdescription.cc ('k') | webrtc/sound/automaticallychosensoundsystem_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sound/alsasoundsystem.cc
diff --git a/webrtc/sound/alsasoundsystem.cc b/webrtc/sound/alsasoundsystem.cc
index 3cc77a988c8c95200ccdee47128fc4992e525c68..3f97446e0610f63806b45bcb846bd8e37e847607 100644
--- a/webrtc/sound/alsasoundsystem.cc
+++ b/webrtc/sound/alsasoundsystem.cc
@@ -11,15 +11,17 @@
#include "webrtc/sound/alsasoundsystem.h"
#include <algorithm>
-#include "webrtc/sound/sounddevicelocator.h"
-#include "webrtc/sound/soundinputstreaminterface.h"
-#include "webrtc/sound/soundoutputstreaminterface.h"
+
+#include "webrtc/base/arraysize.h"
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/stringutils.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/base/worker.h"
+#include "webrtc/sound/sounddevicelocator.h"
+#include "webrtc/sound/soundinputstreaminterface.h"
+#include "webrtc/sound/soundoutputstreaminterface.h"
namespace rtc {
@@ -606,8 +608,6 @@ bool AlsaSoundSystem::GetDefaultDevice(SoundDeviceLocator **device) {
}
inline size_t AlsaSoundSystem::FrameSize(const OpenParams &params) {
- ASSERT(static_cast<int>(params.format) <
- ARRAY_SIZE(kCricketFormatToSampleSizeTable));
return kCricketFormatToSampleSizeTable[params.format] * params.channels;
}
@@ -662,8 +662,7 @@ StreamInterface *AlsaSoundSystem::OpenDevice(
latency = std::max(latency, kMinimumLatencyUsecs);
}
- ASSERT(static_cast<int>(params.format) <
- ARRAY_SIZE(kCricketFormatToAlsaFormatTable));
+ ASSERT(params.format < arraysize(kCricketFormatToAlsaFormatTable));
err = symbol_table_.snd_pcm_set_params()(
handle,
« no previous file with comments | « webrtc/p2p/base/transportdescription.cc ('k') | webrtc/sound/automaticallychosensoundsystem_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698