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

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

Issue 1545333002: Convert Pass()→std::move() in //third_party/mojo (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: third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.cc
diff --git a/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.cc b/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.cc
index 24c147211bb9da9a3e1b10c7e02ee448ed305bde..a1dca82ba4848c0a655340f0d5974789ed2f4c82 100644
--- a/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.cc
+++ b/third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.cc
@@ -4,6 +4,8 @@
#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_shared_buffer.h"
+#include <utility>
+
#include "base/logging.h"
#include "third_party/mojo/src/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)

Powered by Google App Engine
This is Rietveld 408576698