Group GncOptionMultChoiceValue::set_multiple with set_default_multiple.

Better readability.
This commit is contained in:
John Ralls 2021-03-11 18:15:57 -08:00
parent 27670a6e98
commit be322a0d7c

View File

@ -668,13 +668,6 @@ public:
throw std::invalid_argument("Value not a valid choice.");
}
void set_multiple(const GncMultichoiceOptionIndexVec& indexes)
{
if (validate(indexes))
m_value = indexes;
else
throw std::invalid_argument("One of the supplied indexes was out of range.");
}
void set_default_value(const std::string& value)
{
auto index = find_key(value);
@ -702,6 +695,13 @@ public:
throw std::invalid_argument("Value not a valid choice.");
}
void set_multiple(const GncMultichoiceOptionIndexVec& indexes)
{
if (validate(indexes))
m_value = indexes;
else
throw std::invalid_argument("One of the supplied indexes was out of range.");
}
void set_default_multiple(const GncMultichoiceOptionIndexVec& indexes)
{
if (validate(indexes))