From 3d995de2ab584036d7b96f7b3a6b2a6704d18591 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Wed, 15 Feb 2023 19:32:19 +0000 Subject: [PATCH] Refactor: use default GncOptionValue copy constructor --- libgnucash/engine/gnc-option-impl.cpp | 14 -------------- libgnucash/engine/gnc-option-impl.hpp | 6 +----- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/libgnucash/engine/gnc-option-impl.cpp b/libgnucash/engine/gnc-option-impl.cpp index 7da268f691..820e8e88a7 100644 --- a/libgnucash/engine/gnc-option-impl.cpp +++ b/libgnucash/engine/gnc-option-impl.cpp @@ -912,20 +912,6 @@ operator>> (std::istream& iss, GncOptionCommodityValue& opt) return iss; } -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); -template GncOptionValue::GncOptionValue(const GncOptionValue&); template void GncOptionValue::set_value(bool); template void GncOptionValue::set_value(int); template void GncOptionValue::set_value(int64_t); diff --git a/libgnucash/engine/gnc-option-impl.hpp b/libgnucash/engine/gnc-option-impl.hpp index 302a2a2915..fec6a5db7f 100644 --- a/libgnucash/engine/gnc-option-impl.hpp +++ b/libgnucash/engine/gnc-option-impl.hpp @@ -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;