Refactor: use default GncOptionValue copy constructor

This commit is contained in:
Richard Cohen 2023-02-15 19:32:19 +00:00
parent 1b0af4246a
commit 3d995de2ab
2 changed files with 1 additions and 19 deletions

View File

@ -912,20 +912,6 @@ operator>> (std::istream& iss, GncOptionCommodityValue& opt)
return iss;
}
template GncOptionValue<bool>::GncOptionValue(const GncOptionValue<bool>&);
template GncOptionValue<int>::GncOptionValue(const GncOptionValue<int>&);
template GncOptionValue<int64_t>::GncOptionValue(const GncOptionValue<int64_t>&);
template GncOptionValue<double>::GncOptionValue(const GncOptionValue<double>&);
template GncOptionValue<char*>::GncOptionValue(const GncOptionValue<char*>&);
template GncOptionValue<const char*>::GncOptionValue(const GncOptionValue<const char*>&);
template GncOptionValue<std::string>::GncOptionValue(const GncOptionValue<std::string>&);
template GncOptionValue<const QofQuery*>::GncOptionValue(const GncOptionValue<const QofQuery*>&);
template GncOptionValue<const GncOwner*>::GncOptionValue(const GncOptionValue<const GncOwner*>&);
template GncOptionValue<RelativeDatePeriod>::GncOptionValue(const GncOptionValue<RelativeDatePeriod>&);
template GncOptionValue<uint16_t>::GncOptionValue(const GncOptionValue<uint16_t>&);
template GncOptionValue<GncOptionAccountList>::GncOptionValue(const GncOptionValue<GncOptionAccountList>&);
template GncOptionValue<GncMultichoiceOptionIndexVec>::GncOptionValue(const GncOptionValue<GncMultichoiceOptionIndexVec>&);
template GncOptionValue<GncOptionReportPlacementVec>::GncOptionValue(const GncOptionValue<GncOptionReportPlacementVec>&);
template void GncOptionValue<bool>::set_value(bool);
template void GncOptionValue<int>::set_value(int);
template void GncOptionValue<int64_t>::set_value(int64_t);

View File

@ -91,11 +91,7 @@ public:
GncOptionUIType ui_type = GncOptionUIType::INTERNAL) :
OptionClassifier{section, name, key, doc_string},
m_ui_type(ui_type), m_value{value}, m_default_value{value} { }
GncOptionValue(const GncOptionValue& from) :
OptionClassifier{from.m_section, from.m_name, from.m_sort_tag,
from.m_doc_string},
m_ui_type(from.get_ui_type()), m_value{from.get_value()},
m_default_value{from.get_default_value()}{}
GncOptionValue(const GncOptionValue&) = default;
GncOptionValue(GncOptionValue&&) = default;
GncOptionValue& operator=(const GncOptionValue&) = default;
GncOptionValue& operator=(GncOptionValue&&) = default;