Review comments

This commit is contained in:
jpirnay
2026-04-20 21:16:31 +02:00
parent 3a4923c8d5
commit 425c1db132
5 changed files with 16 additions and 30 deletions
+6
View File
@@ -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;