From cdd0b4fb7d48b32686d56364cf170569bdb0149d Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 15 Apr 2022 19:44:07 -0400 Subject: Use = default and = delete where possible in classes --- include/qpdf/JSON.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include/qpdf/JSON.hh') diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 2961d8a9..a2a0ea27 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -150,25 +150,25 @@ class JSON struct JSON_value { - virtual ~JSON_value(); + virtual ~JSON_value() = default; virtual std::string unparse(size_t depth) const = 0; }; struct JSON_dictionary: public JSON_value { - virtual ~JSON_dictionary(); + virtual ~JSON_dictionary() = default; virtual std::string unparse(size_t depth) const; std::map> members; }; struct JSON_array: public JSON_value { - virtual ~JSON_array(); + virtual ~JSON_array() = default; virtual std::string unparse(size_t depth) const; std::vector> elements; }; struct JSON_string: public JSON_value { JSON_string(std::string const& utf8); - virtual ~JSON_string(); + virtual ~JSON_string() = default; virtual std::string unparse(size_t depth) const; std::string utf8; std::string encoded; @@ -178,20 +178,20 @@ class JSON JSON_number(long long val); JSON_number(double val); JSON_number(std::string const& val); - virtual ~JSON_number(); + virtual ~JSON_number() = default; virtual std::string unparse(size_t depth) const; std::string encoded; }; struct JSON_bool: public JSON_value { JSON_bool(bool val); - virtual ~JSON_bool(); + virtual ~JSON_bool() = default; virtual std::string unparse(size_t depth) const; bool value; }; struct JSON_null: public JSON_value { - virtual ~JSON_null(); + virtual ~JSON_null() = default; virtual std::string unparse(size_t depth) const; }; @@ -210,11 +210,11 @@ class JSON public: QPDF_DLL - ~Members(); + ~Members() = default; private: Members(std::shared_ptr); - Members(Members const&); + Members(Members const&) = delete; std::shared_ptr value; }; -- cgit v1.2.3-54-g00ecf