mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] GlobalPreferences: add an assertion to ensure the the fetched
exam mode can be casted in GlobalPreferences::ExamMode
This commit is contained in:
committed by
LeaNumworks
parent
425f0cb459
commit
902cc64d32
@@ -7,7 +7,9 @@ GlobalPreferences * GlobalPreferences::sharedGlobalPreferences() {
|
||||
|
||||
GlobalPreferences::ExamMode GlobalPreferences::examMode() const {
|
||||
if (m_examMode == ExamMode::Unknown) {
|
||||
m_examMode = (ExamMode)Ion::ExamMode::FetchExamMode();
|
||||
uint8_t mode = Ion::ExamMode::FetchExamMode();
|
||||
assert(mode >= 0 && mode < 3); // mode can be cast in ExamMode (Off, Standard or Dutch)
|
||||
m_examMode = (ExamMode)mode;
|
||||
}
|
||||
return m_examMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user