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

Unified Diff: remoting/codec/audio_encoder_opus.cc

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: remoting/codec/audio_encoder_opus.cc
diff --git a/remoting/codec/audio_encoder_opus.cc b/remoting/codec/audio_encoder_opus.cc
index 53bfe0b0c0893acd58b384e586224f63b58effe6..b2a9b5eafe431463908e1a1bf85215e36a5dce2a 100644
--- a/remoting/codec/audio_encoder_opus.cc
+++ b/remoting/codec/audio_encoder_opus.cc
@@ -142,7 +142,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
if (!ResetForPacket(packet.get())) {
LOG(ERROR) << "Encoder initialization failed";
- return scoped_ptr<AudioPacket>();
+ return nullptr;
}
int samples_in_packet = packet->data(0).size() / kBytesPerSample / channels_;
@@ -200,7 +200,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
buffer, data->length());
if (result < 0) {
LOG(ERROR) << "opus_encode() failed with error code: " << result;
- return scoped_ptr<AudioPacket>();
+ return nullptr;
}
DCHECK_LE(result, static_cast<int>(data->length()));
@@ -230,7 +230,7 @@ scoped_ptr<AudioPacket> AudioEncoderOpus::Encode(
// Return NULL if there's nothing in the packet.
if (encoded_packet->data_size() == 0)
- return scoped_ptr<AudioPacket>();
+ return nullptr;
return encoded_packet.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698