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

Unified Diff: mojo/edk/system/platform_handle_dispatcher.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/system/platform_handle_dispatcher.cc
diff --git a/mojo/edk/system/platform_handle_dispatcher.cc b/mojo/edk/system/platform_handle_dispatcher.cc
index c56f4154500319fba2104a62a07a97fd2ddfdce3..2d3dca976c49837f717014b54bf686c6f6c474b8 100644
--- a/mojo/edk/system/platform_handle_dispatcher.cc
+++ b/mojo/edk/system/platform_handle_dispatcher.cc
@@ -5,6 +5,7 @@
#include "mojo/edk/system/platform_handle_dispatcher.h"
#include <algorithm>
+#include <utility>
#include "base/logging.h"
@@ -23,7 +24,7 @@ struct MOJO_ALIGNAS(8) SerializedPlatformHandleDispatcher {
ScopedPlatformHandle PlatformHandleDispatcher::PassPlatformHandle() {
base::AutoLock locker(lock());
- return platform_handle_.Pass();
+ return std::move(platform_handle_);
}
Dispatcher::Type PlatformHandleDispatcher::GetType() const {
@@ -65,8 +66,7 @@ scoped_refptr<PlatformHandleDispatcher> PlatformHandleDispatcher::Deserialize(
PlatformHandleDispatcher::PlatformHandleDispatcher(
ScopedPlatformHandle platform_handle)
- : platform_handle_(platform_handle.Pass()) {
-}
+ : platform_handle_(std::move(platform_handle)) {}
PlatformHandleDispatcher::~PlatformHandleDispatcher() {
}
@@ -79,7 +79,7 @@ void PlatformHandleDispatcher::CloseImplNoLock() {
scoped_refptr<Dispatcher>
PlatformHandleDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
lock().AssertAcquired();
- return Create(platform_handle_.Pass());
+ return Create(std::move(platform_handle_));
}
void PlatformHandleDispatcher::StartSerializeImplNoLock(
« no previous file with comments | « mojo/edk/system/platform_handle_dispatcher.h ('k') | mojo/edk/system/platform_handle_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698