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

Unified Diff: webrtc/base/buffer.h

Issue 1570473002: Replace manual casting to rvalue reference with calls to std::move (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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/optional.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/buffer.h
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index 076fa08f26e10c3b750b01b9f07314391dd5054a..bf2e9f3c933d031a4a28546333f70a8162e35d82 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -172,7 +172,7 @@ class Buffer {
// b.Pass() does the same thing as std::move(b).
Buffer&& Pass() {
assert(IsConsistent());
- return static_cast<Buffer&&>(*this);
+ return std::move(*this);
}
// Resets the buffer to zero size and capacity. Works even if the buffer has
« no previous file with comments | « no previous file | webrtc/base/optional.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698