diff --git a/src/config_param.h b/src/config_param.h index c647d9f99c6..036503eb12c 100644 --- a/src/config_param.h +++ b/src/config_param.h @@ -356,7 +356,7 @@ class EnumConfigParam : public ConfigParamBase { EnumConfigParam(StringView name, StringView description, StringView config_section, StringView config_key, E value, std::array values, std::array tags, std::array value_descriptions) : ConfigParamBase(name, description, config_section, config_key, value), _values{ values }, _tags{ tags}, _value_descriptions{ value_descriptions } { for (size_t i = 0; i < S; ++i) { - _valid[static_cast(S)] = true; + _valid[static_cast(i)] = true; } } @@ -425,7 +425,7 @@ class EnumConfigParam : public ConfigParamBase { } private: - lcf::FlagSet _valid = ~lcf::FlagSet(); + lcf::FlagSet _valid; std::array _values; std::array _tags; std::array _value_descriptions;