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

Unified Diff: device/serial/serial_device_enumerator_win.cc

Issue 1576283002: mojo: Remove Pass() from MOJO_MOVE_ONLY_TYPE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojopass: morewindows 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 | « device/serial/serial_device_enumerator_mac.cc ('k') | device/serial/serial_io_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_device_enumerator_win.cc
diff --git a/device/serial/serial_device_enumerator_win.cc b/device/serial/serial_device_enumerator_win.cc
index fe735af8290441c67c6900d743619978a327fa8f..79c40013fe6711d40a56e3ed3054c7a1a6b226cf 100644
--- a/device/serial/serial_device_enumerator_win.cc
+++ b/device/serial/serial_device_enumerator_win.cc
@@ -93,7 +93,7 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
HDEVINFO dev_info =
SetupDiGetClassDevs(&GUID_DEVCLASS_PORTS, 0, 0, DIGCF_PRESENT);
if (dev_info == INVALID_HANDLE_VALUE)
- return devices.Pass();
+ return devices;
SP_DEVINFO_DATA dev_info_data;
dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
@@ -128,11 +128,11 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesNew() {
}
}
- devices.push_back(info.Pass());
+ devices.push_back(std::move(info));
}
SetupDiDestroyDeviceInfoList(dev_info);
- return devices.Pass();
+ return devices;
}
// Returns an array of devices as retrieved through the old method of
@@ -145,9 +145,9 @@ mojo::Array<serial::DeviceInfoPtr> GetDevicesOld() {
for (; iter_key.Valid(); ++iter_key) {
serial::DeviceInfoPtr info(serial::DeviceInfo::New());
info->path = base::UTF16ToASCII(iter_key.Value());
- devices.push_back(info.Pass());
+ devices.push_back(std::move(info));
}
- return devices.Pass();
+ return devices;
}
} // namespace
@@ -186,7 +186,7 @@ mojo::Array<serial::DeviceInfoPtr> SerialDeviceEnumeratorWin::GetDevices() {
mojo::Array<serial::DeviceInfoPtr> devices;
deviceMap.DecomposeMapTo(&paths, &devices);
- return devices.Pass();
+ return devices;
}
} // namespace device
« no previous file with comments | « device/serial/serial_device_enumerator_mac.cc ('k') | device/serial/serial_io_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698