mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Create the GncOptionVariant's GncOptionValue in place.
Saves a temporary, prevents premature unprotecting of Scheme objects.
This commit is contained in:
parent
c034a26ae7
commit
f5d8d508ee
@ -40,8 +40,9 @@ template <typename ValueType,
|
|||||||
GncOption::GncOption(const char* section, const char* name,
|
GncOption::GncOption(const char* section, const char* name,
|
||||||
const char* key, const char* doc_string,
|
const char* key, const char* doc_string,
|
||||||
ValueType value, GncOptionUIType ui_type) :
|
ValueType value, GncOptionUIType ui_type) :
|
||||||
m_option{std::make_unique<GncOptionVariant>(GncOptionValue<ValueType> {
|
m_option{std::make_unique<GncOptionVariant>(
|
||||||
section, name, key, doc_string, value, ui_type})}
|
std::in_place_type<GncOptionValue<ValueType>>,
|
||||||
|
section, name, key, doc_string, value, ui_type)}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user