diff options
author | 2016-09-28 23:24:59 +0000 | |
---|---|---|
committer | 2016-09-28 23:24:59 +0000 | |
commit | 35d869c15e79f0dedf62b55f5ce32909d721542c (patch) | |
tree | a93a11aadc0897a4d6cf32de02bd4792238c4d58 | |
parent | 64e47fabae23a53edab9d6e0dc1d04cca6105714 (diff) | |
parent | a14988687857ba30c27534fea39c47ceb47d3571 (diff) |
Merge "Fix libinput warnings" am: a4767442e3
am: a149886878
Change-Id: Ie7aaee558da27d52cc20574dfea4eb61f68c2901
-rw-r--r-- | include/input/Input.h | 2 | ||||
-rw-r--r-- | include/input/InputEventLabels.h | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/input/Input.h b/include/input/Input.h index 55787e7c75..cfcafabebf 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -398,7 +398,7 @@ public: inline int32_t getButtonState() const { return mButtonState; } - inline int32_t setButtonState(int32_t buttonState) { mButtonState = buttonState; } + inline void setButtonState(int32_t buttonState) { mButtonState = buttonState; } inline int32_t getActionButton() const { return mActionButton; } diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h index b7012eb32b..b59728ac39 100644 --- a/include/input/InputEventLabels.h +++ b/include/input/InputEventLabels.h @@ -421,30 +421,30 @@ static const char* lookupLabelByValue(int value, const InputEventLabel* list) { return NULL; } -static int32_t getKeyCodeByLabel(const char* label) { +static inline int32_t getKeyCodeByLabel(const char* label) { return int32_t(lookupValueByLabel(label, KEYCODES)); } -static const char* getLabelByKeyCode(int32_t keyCode) { - if (keyCode >= 0 && keyCode < size(KEYCODES)) { +static inline const char* getLabelByKeyCode(int32_t keyCode) { + if (keyCode >= 0 && keyCode < static_cast<int32_t>(size(KEYCODES))) { return KEYCODES[keyCode].literal; } return NULL; } -static uint32_t getKeyFlagByLabel(const char* label) { +static inline uint32_t getKeyFlagByLabel(const char* label) { 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)); } -static const char* getAxisLabel(int32_t axisId) { +static inline const char* getAxisLabel(int32_t axisId) { 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)); } |