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

Unified Diff: webrtc/base/copyonwritebuffer.h

Issue 2191863002: Implement CopyOnWriteBuffer move using scoped_refptr move (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 5 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/base/copyonwritebuffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/copyonwritebuffer.h
diff --git a/webrtc/base/copyonwritebuffer.h b/webrtc/base/copyonwritebuffer.h
index a7e52beea53c3ce442ac3b97a1db013590e08861..16e15f946b186e71f460fe36c3ab2a21597a11b7 100644
--- a/webrtc/base/copyonwritebuffer.h
+++ b/webrtc/base/copyonwritebuffer.h
@@ -119,9 +119,7 @@ class CopyOnWriteBuffer {
CopyOnWriteBuffer& operator=(CopyOnWriteBuffer&& buf) {
RTC_DCHECK(IsConsistent());
RTC_DCHECK(buf.IsConsistent());
- // TODO(jbauch): use std::move once scoped_refptr supports it (issue 5556)
- buffer_.swap(buf.buffer_);
- buf.buffer_ = nullptr;
+ buffer_ = std::move(buf.buffer_);
return *this;
}
« no previous file with comments | « no previous file | webrtc/base/copyonwritebuffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698