Skip to content

Commit

Permalink
Explicitly cast a value to the decltype of get_value().
Browse files Browse the repository at this point in the history
Can't always rely on implicit conversion working.
  • Loading branch information
jralls committed Aug 17, 2021
1 parent bbe8ebb commit 3d1812a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libgnucash/app-utils/gnc-optiondb.i
Expand Up @@ -899,7 +899,7 @@ wrap_unique_ptr(GncOptionDBPtr, GncOptionDB);
return;
}
auto value{scm_to_value<std::decay_t<decltype(option.get_value())>>(new_value)}; //Can't inline, set_value takes arg by reference.
option.set_value(value);
option.set_value(static_cast<decltype(option.get_value())>(value));
}, swig_get_option($self));
}
catch(const std::invalid_argument& err)
Expand Down

0 comments on commit 3d1812a

Please sign in to comment.