perf: small perf changes in HidChooserController (#39057)
* perf: avoid string temporary in HidChooserController::PhysicalDeviceIdFromDeviceInfo() return a const ref instead of a new string * perf: avoid second map lookup in HidChooserController::AddDeviceInfo()
This commit is contained in:
parent
cc39ddb728
commit
f2b32af1f6
2 changed files with 16 additions and 18 deletions
|
@ -54,7 +54,7 @@ class HidChooserController
|
|||
~HidChooserController() override;
|
||||
|
||||
// static
|
||||
static std::string PhysicalDeviceIdFromDeviceInfo(
|
||||
static const std::string& PhysicalDeviceIdFromDeviceInfo(
|
||||
const device::mojom::HidDeviceInfo& device);
|
||||
|
||||
// HidChooserContext::DeviceObserver:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue