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

Unified Diff: mojo/edk/embedder/simple_platform_shared_buffer.cc

Issue 1529303004: Convert Pass()→std::move() in mojo/edk/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: mojo/edk/embedder/simple_platform_shared_buffer.cc
diff --git a/mojo/edk/embedder/simple_platform_shared_buffer.cc b/mojo/edk/embedder/simple_platform_shared_buffer.cc
index c09eb8072a99de902f1ac413bc4adb74c284f2eb..b33e5cdec8fdc943c7c92ee4cfb12e4903f1f8cc 100644
--- a/mojo/edk/embedder/simple_platform_shared_buffer.cc
+++ b/mojo/edk/embedder/simple_platform_shared_buffer.cc
@@ -4,6 +4,8 @@
#include "mojo/edk/embedder/simple_platform_shared_buffer.h"
+#include <utility>
+
#include "base/logging.h"
#include "mojo/edk/embedder/platform_handle_utils.h"
@@ -34,7 +36,7 @@ SimplePlatformSharedBuffer::CreateFromPlatformHandle(
DCHECK_GT(num_bytes, 0u);
SimplePlatformSharedBuffer* rv = new SimplePlatformSharedBuffer(num_bytes);
- if (!rv->InitFromPlatformHandle(platform_handle.Pass())) {
+ if (!rv->InitFromPlatformHandle(std::move(platform_handle))) {
// We can't just delete it directly, due to the "in destructor" (debug)
// check.
scoped_refptr<SimplePlatformSharedBuffer> deleter(rv);
@@ -82,7 +84,7 @@ ScopedPlatformHandle SimplePlatformSharedBuffer::DuplicatePlatformHandle() {
ScopedPlatformHandle SimplePlatformSharedBuffer::PassPlatformHandle() {
DCHECK(HasOneRef());
- return handle_.Pass();
+ return std::move(handle_);
}
SimplePlatformSharedBuffer::SimplePlatformSharedBuffer(size_t num_bytes)
« no previous file with comments | « mojo/edk/embedder/platform_channel_pair_posix_unittest.cc ('k') | mojo/edk/embedder/simple_platform_shared_buffer_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698