Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60b48c66 authored by Yabin Cui's avatar Yabin Cui
Browse files

Fix error for compiler update.

frameworks/native/services/inputflinger/reader/mapper/SensorInputMapper.cpp
:306:23: error: declaration shadows a local variable [-Werror,-Wshadow]
    for (const auto& [sensorType, sensor] : mSensors) {
                      ^

Bug: 193903230
Test: build with the next compiler
Change-Id: I8087db738cfbef82e8264bbbc22515361bd11bf1
(cherry picked from commit 823144f3)
parent be5e3975
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -303,7 +303,7 @@ bool SensorInputMapper::setSensorEnabled(InputDeviceSensorType sensorType, bool
     * the device
     * the device
     */
     */
    mDeviceEnabled = false;
    mDeviceEnabled = false;
    for (const auto& [sensorType, sensor] : mSensors) {
    for (const auto& [_, sensor] : mSensors) {
        // If any sensor is on we will turn on the device.
        // If any sensor is on we will turn on the device.
        if (sensor.enabled) {
        if (sensor.enabled) {
            mDeviceEnabled = true;
            mDeviceEnabled = true;