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

Commit 3cab9b64 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Remove eventTime from MotionEntry

EventEntry, the base class for MotionEntry, already has field
'eventTime'. However, MotionEntry was defining its own 'eventTime'.
Remove it.

This was discovered by setting '-Wshadow-all'.
However, setting that flag does not allow having initializer lists where
parameter name matches the field name.

Therefore, avoid "-Wshadow-all" and just turn on some of the additional
checks that it provides.

Bug: 142017994
Test: m sync inputflinger_tests libinput_tests inputflinger_benchmarks StructLayout_test libgui_test inputflinger_benchmarks
Change-Id: I6c62fe4362bac09731c3855537db6bf3b7493ec1
parent fbbd1a5e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@ cc_defaults {
        "-Wno-unused-parameter",
        "-Wno-unused-parameter",
        "-Wthread-safety",
        "-Wthread-safety",
        "-Wshadow",
        "-Wshadow",
        "-Wshadow-field-in-constructor-modified",
        "-Wshadow-uncaptured-local",
    ],
    ],
}
}


+0 −1
Original line number Original line Diff line number Diff line
@@ -185,7 +185,6 @@ MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32
                         uint32_t pointerCount, const PointerProperties* pointerProperties,
                         uint32_t pointerCount, const PointerProperties* pointerProperties,
                         const PointerCoords* pointerCoords, float xOffset, float yOffset)
                         const PointerCoords* pointerCoords, float xOffset, float yOffset)
      : EventEntry(id, Type::MOTION, eventTime, policyFlags),
      : EventEntry(id, Type::MOTION, eventTime, policyFlags),
        eventTime(eventTime),
        deviceId(deviceId),
        deviceId(deviceId),
        source(source),
        source(source),
        displayId(displayId),
        displayId(displayId),
+0 −1
Original line number Original line Diff line number Diff line
@@ -156,7 +156,6 @@ protected:
};
};


struct MotionEntry : EventEntry {
struct MotionEntry : EventEntry {
    nsecs_t eventTime;
    int32_t deviceId;
    int32_t deviceId;
    uint32_t source;
    uint32_t source;
    int32_t displayId;
    int32_t displayId;