From f5d8d508eec31bf1fe900a967551d36edd383953 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 19 Jul 2021 10:42:24 -0700 Subject: [PATCH] Create the GncOptionVariant's GncOptionValue in place. Saves a temporary, prevents premature unprotecting of Scheme objects. --- libgnucash/app-utils/gnc-option.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libgnucash/app-utils/gnc-option.cpp b/libgnucash/app-utils/gnc-option.cpp index 8aa240622b..1153e0c943 100644 --- a/libgnucash/app-utils/gnc-option.cpp +++ b/libgnucash/app-utils/gnc-option.cpp @@ -40,8 +40,9 @@ template (GncOptionValue { - section, name, key, doc_string, value, ui_type})} + m_option{std::make_unique( + std::in_place_type>, + section, name, key, doc_string, value, ui_type)} { }