summaryrefslogtreecommitdiff
path: root/include/input/InputEventLabels.h
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2016-09-27 14:12:09 -0700
committer Colin Cross <ccross@android.com> 2016-09-28 23:13:37 +0000
commit1eadf8d95daf642faec1037d7fa5aca1a8c220e5 (patch)
tree520086d4f6a2cd15ae0966353f5e137d66b6d222 /include/input/InputEventLabels.h
parentc8de4a06abc98e67c2fba234a5a3a026742fd4db (diff)
Fix libinput warnings
The warnings were being hidden by the use of -isystem to include frameworks/native/include. Bug: 31752268 Test: m -j Change-Id: I13f03892c75ea3c3139ca676666b0d403871d241
Diffstat (limited to 'include/input/InputEventLabels.h')
-rw-r--r--include/input/InputEventLabels.h14
1 files changed, 7 insertions, 7 deletions
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));
}