Skip to content

Commit

Permalink
Fix some overly-long lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Aug 13, 2021
1 parent 1af97eb commit e43ff93
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions libgnucash/app-utils/gnc-option.cpp
Expand Up @@ -125,9 +125,10 @@ GncOption::set_value(ValueType value)
if constexpr (std::is_same_v<std::decay_t<ValueType>,
GncMultichoiceOptionIndexVec>)
option.set_multiple(value);
else if constexpr (std::is_same_v<ValueType, size_t> ||
std::is_same_v<std::decay_t<ValueType>, std::string> ||
std::is_same_v<std::remove_cv<ValueType>, char*>)
else if constexpr
(std::is_same_v<ValueType, size_t> ||
std::is_same_v<std::decay_t<ValueType>, std::string> ||
std::is_same_v<std::remove_cv<ValueType>, char*>)
option.set_value(value);
}
}, *m_option);
Expand All @@ -150,12 +151,14 @@ GncOption::set_default_value(ValueType value)
(std::is_same_v<std::decay_t<decltype(option)>,
GncOptionMultichoiceValue>)
{
if constexpr (std::is_same_v<std::decay_t<ValueType>,
GncMultichoiceOptionIndexVec>)
if constexpr
(std::is_same_v<std::decay_t<ValueType>,
GncMultichoiceOptionIndexVec>)
option.set_multiple(value);
else if constexpr (std::is_same_v<ValueType, size_t> ||
std::is_same_v<std::decay_t<ValueType>, std::string> ||
std::is_same_v<std::remove_cv<ValueType>, char*>)
else if constexpr
(std::is_same_v<ValueType, size_t> ||
std::is_same_v<std::decay_t<ValueType>, std::string> ||
std::is_same_v<std::remove_cv<ValueType>, char*>)
option.set_default_value(value);
}
}, *m_option);
Expand Down

0 comments on commit e43ff93

Please sign in to comment.