From a4f3dddb79e875bae74b8d4f3ebd6a94076e8a9e Mon Sep 17 00:00:00 2001 From: m-holger Date: Sun, 5 Feb 2023 18:39:30 +0000 Subject: Change JSON_dictionary and JSON_array to store JSON objects rather than std::shared_ptr Recognise that JSON objects are effectively shared pointers to JSON_value. --- include/qpdf/JSON.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 2906d85a..8cd4e2fe 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -54,6 +54,8 @@ class JSON { public: static int constexpr LATEST = 2; + + QPDF_DLL JSON() = default; QPDF_DLL @@ -369,7 +371,7 @@ class JSON } virtual ~JSON_dictionary() = default; virtual void write(Pipeline*, size_t depth) const; - std::map> members; + std::map members; std::set parsed_keys; }; struct JSON_array: public JSON_value @@ -380,7 +382,7 @@ class JSON } virtual ~JSON_array() = default; virtual void write(Pipeline*, size_t depth) const; - std::vector> elements; + std::vector elements; }; struct JSON_string: public JSON_value { -- cgit v1.2.3-54-g00ecf