Review comments
This commit is contained in:
@@ -31,6 +31,12 @@ struct SettingInfo {
|
||||
StrId nameId;
|
||||
SettingType type;
|
||||
uint8_t CrossPointSettings::* valuePtr = nullptr;
|
||||
// Enum values are used as StrId references for localization via I18N.get().
|
||||
// If enumLabels is populated, it is authoritative for display and index bounds.
|
||||
// In that case it must have the same length as enumValues, because consumers
|
||||
// such as getDisplayValue(), toggleValue(), and CrossPointWebServer::handleGetSettings()
|
||||
// prefer enumLabels when present. Code paths which validate posted enum values
|
||||
// should also use enumLabels.size() when enumLabels is non-empty.
|
||||
std::vector<StrId> enumValues;
|
||||
std::vector<std::string> enumLabels;
|
||||
SettingAction action = SettingAction::None;
|
||||
|
||||
Reference in New Issue
Block a user