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

Unified Diff: media/base/byte_queue.cc

Issue 2330543002: Change unique_ptr::reset() for std::move (Closed)
Patch Set: Change unique_ptr::reset() for std::move Created 4 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
« no previous file with comments | « AUTHORS ('k') | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/byte_queue.cc
diff --git a/media/base/byte_queue.cc b/media/base/byte_queue.cc
index 6ff60e648671135989c7ad207cbee21512b3dd69..94000fac33788546f2d4bbeeebe4f9960f08c2f3 100644
--- a/media/base/byte_queue.cc
+++ b/media/base/byte_queue.cc
@@ -45,7 +45,7 @@ void ByteQueue::Push(const uint8_t* data, int size) {
if (used_ > 0)
memcpy(new_buffer.get(), front(), used_);
- buffer_.reset(new_buffer.release());
+ buffer_ = std::move(new_buffer);
size_ = new_size;
offset_ = 0;
} else if ((offset_ + used_ + size) > size_) {
« no previous file with comments | « AUTHORS ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698