Chromium Code Reviews| Index: webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| diff --git a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| index 340cf581b6d80ec57516786b0b96ebaa62eb129b..ba94bb8860a42192bba8611801845637e5936647 100644 |
| --- a/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| +++ b/webrtc/modules/audio_coding/neteq/neteq_unittest.cc |
| @@ -1522,9 +1522,9 @@ void NetEqDecodingTest::DuplicateCng() { |
| } |
| uint32_t NetEqDecodingTest::PlayoutTimestamp() { |
| - uint32_t playout_timestamp = 0; |
| - EXPECT_TRUE(neteq_->GetPlayoutTimestamp(&playout_timestamp)); |
| - return playout_timestamp; |
| + rtc::Optional<uint32_t> playout_timestamp = neteq_->GetPlayoutTimestamp(); |
| + EXPECT_TRUE(playout_timestamp); |
| + return playout_timestamp ? *playout_timestamp : 0; |
|
minyue-webrtc
2016/04/04 15:53:50
consider using value_or()
hlundin-webrtc
2016/04/04 21:02:54
Nice. I didn't know about that one. Done.
|
| } |
| TEST_F(NetEqDecodingTest, DiscardDuplicateCng) { DuplicateCng(); } |
| @@ -1570,5 +1570,4 @@ TEST_F(NetEqDecodingTest, CngFirst) { |
| // Verify speech output. |
| EXPECT_EQ(AudioFrame::kNormalSpeech, out_frame_.speech_type_); |
| } |
| - |
| } // namespace webrtc |