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

Unified Diff: device/devices_app/usb/type_converters.cc

Issue 1544323002: Convert Pass()→std::move() in //device (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
« no previous file with comments | « device/devices_app/usb/fake_permission_provider.cc ('k') | device/hid/device_monitor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/devices_app/usb/type_converters.cc
diff --git a/device/devices_app/usb/type_converters.cc b/device/devices_app/usb/type_converters.cc
index cc6852b45465b279885a78956e28619197ca2a24..7152d45009976ad21cfd4e920f877420c42966b9 100644
--- a/device/devices_app/usb/type_converters.cc
+++ b/device/devices_app/usb/type_converters.cc
@@ -143,7 +143,7 @@ TypeConverter<device::usb::EndpointInfoPtr, device::UsbEndpointDescriptor>::
ConvertTo<device::usb::TransferDirection>(endpoint.direction);
info->type = ConvertTo<device::usb::EndpointType>(endpoint.transfer_type);
info->packet_size = static_cast<uint32_t>(endpoint.maximum_packet_size);
- return info.Pass();
+ return info;
}
// static
@@ -165,7 +165,7 @@ TypeConverter<device::usb::AlternateInterfaceInfoPtr,
info->endpoints.push_back(device::usb::EndpointInfo::From(endpoint));
}
- return info.Pass();
+ return info;
}
// static
@@ -187,12 +187,12 @@ TypeConverter<mojo::Array<device::usb::InterfaceInfoPtr>,
auto info = device::usb::InterfaceInfo::New();
iter = interface_map.insert(std::make_pair(interfaces[i].interface_number,
info.get())).first;
- infos.push_back(info.Pass());
+ infos.push_back(std::move(info));
}
- iter->second->alternates.push_back(alternate.Pass());
+ iter->second->alternates.push_back(std::move(alternate));
}
- return infos.Pass();
+ return infos;
}
// static
@@ -204,7 +204,7 @@ TypeConverter<device::usb::ConfigurationInfoPtr, device::UsbConfigDescriptor>::
info->configuration_value = config.configuration_value;
info->interfaces =
mojo::Array<device::usb::InterfaceInfoPtr>::From(config.interfaces);
- return info.Pass();
+ return info;
}
// static
@@ -216,7 +216,7 @@ device::usb::WebUsbFunctionSubsetPtr TypeConverter<
device::usb::WebUsbFunctionSubset::New();
info->first_interface = function.first_interface;
info->origins = mojo::Array<mojo::String>::From(function.origins);
- return info.Pass();
+ return info;
}
// static
@@ -230,7 +230,7 @@ TypeConverter<device::usb::WebUsbConfigurationSubsetPtr,
info->origins = mojo::Array<mojo::String>::From(config.origins);
info->functions =
mojo::Array<device::usb::WebUsbFunctionSubsetPtr>::From(config.functions);
- return info.Pass();
+ return info;
}
// static
@@ -244,7 +244,7 @@ device::usb::WebUsbDescriptorSetPtr TypeConverter<
info->configurations =
mojo::Array<device::usb::WebUsbConfigurationSubsetPtr>::From(
set.configurations);
- return info.Pass();
+ return info;
}
// static
@@ -264,7 +264,7 @@ TypeConverter<device::usb::DeviceInfoPtr, device::UsbDevice>::Convert(
info->webusb_allowed_origins = device::usb::WebUsbDescriptorSet::From(
*device.webusb_allowed_origins());
}
- return info.Pass();
+ return info;
}
} // namespace mojo
« no previous file with comments | « device/devices_app/usb/fake_permission_provider.cc ('k') | device/hid/device_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698