Skip to content

Commit ace3811

Browse files
committed
InputFilter.cpp: Fix unnecessary copying of InputDeviceInfo
Bug: 245989146 Change-Id: I7dea3fd4a203d944bce7c2dcca99c84ddb2e7f7c Flag: EXEMPT trivial cleanup Test: Presubmit
1 parent 01e3f8a commit ace3811

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/inputflinger/InputFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ InputFilter::InputFilter(InputListenerInterface& listener, IInputFlingerRust& ru
5656
void InputFilter::notifyInputDevicesChanged(const NotifyInputDevicesChangedArgs& args) {
5757
mDeviceInfos.clear();
5858
mDeviceInfos.reserve(args.inputDeviceInfos.size());
59-
for (auto info : args.inputDeviceInfos) {
59+
for (const auto& info : args.inputDeviceInfos) {
6060
AidlDeviceInfo& aidlInfo = mDeviceInfos.emplace_back();
6161
aidlInfo.deviceId = info.getId();
6262
aidlInfo.external = info.isExternal();

0 commit comments

Comments
 (0)