[ion/events] Remove method defaultIsDefined

Change-Id: Ic5c057a451bfc49d99f4b2a70ec5dbff16844a86
This commit is contained in:
Gabriel Ozouf
2020-10-30 13:00:33 +01:00
committed by Émilie Feral
parent 0185e0562c
commit 993de56d59
4 changed files with 2 additions and 14 deletions

View File

@@ -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;

View File

@@ -6,10 +6,6 @@ namespace Events {
void didPressNewKey() {
}
bool Event::isDefined() const {
return defaultIsDefined();
}
const char * Event::text() const {
return defaultText();
}

View File

@@ -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);
}
}

View File

@@ -21,12 +21,5 @@ const char * Event::text() const {
return defaultText();
}
bool Event::isDefined() const {
if (*this == ExternalText) {
return true;
}
return defaultIsDefined();
}
}
}