diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-16 01:44:07 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-16 17:39:14 +0200 |
commit | cdd0b4fb7d48b32686d56364cf170569bdb0149d (patch) | |
tree | b094c966b33575eb9f2e441d1705990f45539bec /include/qpdf/JSON.hh | |
parent | 2a7d2b63c2a7284d1b1179eefbf64f5dd29aa510 (diff) | |
download | qpdf-cdd0b4fb7d48b32686d56364cf170569bdb0149d.tar.zst |
Use = default and = delete where possible in classes
Diffstat (limited to 'include/qpdf/JSON.hh')
-rw-r--r-- | include/qpdf/JSON.hh | 18 |
1 files changed, 9 insertions, 9 deletions
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<std::string, std::shared_ptr<JSON_value>> members; }; struct JSON_array: public JSON_value { - virtual ~JSON_array(); + virtual ~JSON_array() = default; virtual std::string unparse(size_t depth) const; std::vector<std::shared_ptr<JSON_value>> 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<JSON_value>); - Members(Members const&); + Members(Members const&) = delete; std::shared_ptr<JSON_value> value; }; |