mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion/events] Remove method defaultIsDefined
Change-Id: Ic5c057a451bfc49d99f4b2a70ec5dbff16844a86
This commit is contained in:
committed by
Émilie Feral
parent
0185e0562c
commit
993de56d59
@@ -36,7 +36,6 @@ public:
|
||||
bool isDefined() const;
|
||||
static constexpr int PageSize = Keyboard::NumberOfKeys;
|
||||
private:
|
||||
bool defaultIsDefined() const;
|
||||
const char * defaultText() const;
|
||||
|
||||
uint8_t m_id;
|
||||
|
||||
@@ -6,10 +6,6 @@ namespace Events {
|
||||
void didPressNewKey() {
|
||||
}
|
||||
|
||||
bool Event::isDefined() const {
|
||||
return defaultIsDefined();
|
||||
}
|
||||
|
||||
const char * Event::text() const {
|
||||
return defaultText();
|
||||
}
|
||||
|
||||
@@ -52,11 +52,11 @@ bool Event::hasText() const {
|
||||
return text() != nullptr;
|
||||
}
|
||||
|
||||
bool Event::defaultIsDefined() const {
|
||||
bool Event::isDefined() const {
|
||||
if (isKeyboardEvent()) {
|
||||
return s_dataForEvent[m_id].isDefined();
|
||||
} else {
|
||||
return (*this == None || *this == Termination || *this == USBEnumeration || *this == USBPlug || *this == BatteryCharging);
|
||||
return (*this == None || *this == Termination || *this == USBEnumeration || *this == USBPlug || *this == BatteryCharging || *this == ExternalText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,5 @@ const char * Event::text() const {
|
||||
return defaultText();
|
||||
}
|
||||
|
||||
bool Event::isDefined() const {
|
||||
if (*this == ExternalText) {
|
||||
return true;
|
||||
}
|
||||
return defaultIsDefined();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user