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

Unified Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 2697453004: WebRtcVoiceEngineTest: Changed a static_cast to a checked_cast. (Closed)
Patch Set: Rebased. Created 3 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 | « no previous file | webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
index abe4b5313ddf77853fbe13e86e6f903c996a9105..612d5c2e6b0fb27eef815b91f8c7272c767877d2 100644
--- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
+++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/arraysize.h"
#include "webrtc/base/byteorder.h"
#include "webrtc/base/gunit.h"
+#include "webrtc/base/safe_conversions.h"
#include "webrtc/call/call.h"
#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
#include "webrtc/media/base/fakemediaengine.h"
@@ -3724,7 +3725,7 @@ TEST(WebRtcVoiceEngineTest, CollectRecvCodecs) {
}
// Find the index of a codec, or -1 if not found, so that we can easily check
- // supplementary codecs are orderd after the general codecs.
+ // supplementary codecs are ordered after the general codecs.
auto find_codec =
[&codecs](const webrtc::SdpAudioFormat& format) -> int {
for (size_t i = 0; i != codecs.size(); ++i) {
@@ -3732,7 +3733,7 @@ TEST(WebRtcVoiceEngineTest, CollectRecvCodecs) {
if (STR_CASE_CMP(codec.name.c_str(), format.name.c_str()) == 0 &&
codec.clockrate == format.clockrate_hz &&
codec.channels == format.num_channels) {
- return static_cast<int>(i);
+ return rtc::checked_cast<int>(i);
}
}
return -1;
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698