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

Commit 4ae86b1a authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Fix libinput warnings" am: a4767442 am: a1498868 am: 35d869c1

am: fef00db3

Change-Id: I558fa030c995220658d79c96fd8ee451363891f5
parents c85c2316 fef00db3
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -425,30 +425,30 @@ static const char* lookupLabelByValue(int value, const InputEventLabel* list) {
    return NULL;
    return NULL;
}
}


static int32_t getKeyCodeByLabel(const char* label) {
static inline int32_t getKeyCodeByLabel(const char* label) {
    return int32_t(lookupValueByLabel(label, KEYCODES));
    return int32_t(lookupValueByLabel(label, KEYCODES));
}
}


static const char* getLabelByKeyCode(int32_t keyCode) {
static inline const char* getLabelByKeyCode(int32_t keyCode) {
    if (keyCode >= 0 && keyCode < size(KEYCODES)) {
    if (keyCode >= 0 && keyCode < static_cast<int32_t>(size(KEYCODES))) {
        return KEYCODES[keyCode].literal;
        return KEYCODES[keyCode].literal;
    }
    }
    return NULL;
    return NULL;
}
}


static uint32_t getKeyFlagByLabel(const char* label) {
static inline uint32_t getKeyFlagByLabel(const char* label) {
    return uint32_t(lookupValueByLabel(label, FLAGS));
    return uint32_t(lookupValueByLabel(label, FLAGS));
}
}


static int32_t getAxisByLabel(const char* label) {
static inline int32_t getAxisByLabel(const char* label) {
    return int32_t(lookupValueByLabel(label, AXES));
    return int32_t(lookupValueByLabel(label, AXES));
}
}


static const char* getAxisLabel(int32_t axisId) {
static inline const char* getAxisLabel(int32_t axisId) {
    return lookupLabelByValue(axisId, AXES);
    return lookupLabelByValue(axisId, AXES);
}
}


static int32_t getLedByLabel(const char* label) {
static inline int32_t getLedByLabel(const char* label) {
    return int32_t(lookupValueByLabel(label, LEDS));
    return int32_t(lookupValueByLabel(label, LEDS));
}
}