Skip to content

Commit

Permalink
Group GncOptionMultChoiceValue::set_multiple with set_default_multiple.
Browse files Browse the repository at this point in the history
Better readability.
  • Loading branch information
jralls committed Aug 1, 2021
1 parent 27670a6 commit be322a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libgnucash/app-utils/gnc-option-impl.hpp
Expand Up @@ -668,13 +668,6 @@ class GncOptionMultichoiceValue : public OptionClassifier
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);
Expand Down Expand Up @@ -702,6 +695,13 @@ class GncOptionMultichoiceValue : public OptionClassifier
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))
Expand Down

0 comments on commit be322a0

Please sign in to comment.