| 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
|
|
|