mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-29 12:14:31 -06:00
[c++options] Warn when an option variant type's set_value isn't found.
This commit is contained in:
parent
83829e6513
commit
8db8105850
@ -119,7 +119,7 @@ GncOption::set_value(ValueType value)
|
||||
std::is_same_v<ValueType, time64> ||
|
||||
std::is_same_v<ValueType, uint16_t>)))
|
||||
option.set_value(value);
|
||||
if constexpr (is_same_decayed_v<decltype(option),
|
||||
else if constexpr (is_same_decayed_v<decltype(option),
|
||||
GncOptionMultichoiceValue>)
|
||||
{
|
||||
if constexpr (is_same_decayed_v<ValueType,
|
||||
@ -131,6 +131,9 @@ GncOption::set_value(ValueType value)
|
||||
std::is_same_v<std::remove_cv<ValueType>, char*>)
|
||||
option.set_value(value);
|
||||
}
|
||||
else
|
||||
PWARN("No set_value handler: get_value returns %s, value_type is %s",
|
||||
typeid(option.get_value()).name(), typeid(value).name());
|
||||
}, *m_option);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user