aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/JSON.hh
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-02-05 19:53:55 +0100
committerm-holger <m-holger@kubitscheck.org>2023-02-19 13:06:36 +0100
commit7ae1e80fd6626ce07262656a7d822e68004754ae (patch)
tree86271249ace554199fd748d9d95f5156e9dfba8d /include/qpdf/JSON.hh
parenta4f3dddb79e875bae74b8d4f3ebd6a94076e8a9e (diff)
downloadqpdf-7ae1e80fd6626ce07262656a7d822e68004754ae.tar.zst
Change JSON::Members::value to std::unique_ptr
Diffstat (limited to 'include/qpdf/JSON.hh')
-rw-r--r--include/qpdf/JSON.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh
index 8cd4e2fe..b368df99 100644
--- a/include/qpdf/JSON.hh
+++ b/include/qpdf/JSON.hh
@@ -425,7 +425,7 @@ class JSON
std::function<void(Pipeline*)> fn;
};
- JSON(std::shared_ptr<JSON_value>);
+ JSON(std::unique_ptr<JSON_value>);
static bool checkSchemaInternal(
JSON_value* this_v,
@@ -443,13 +443,13 @@ class JSON
~Members() = default;
private:
- Members(std::shared_ptr<JSON_value>);
+ Members(std::unique_ptr<JSON_value>);
Members(Members const&) = delete;
- std::shared_ptr<JSON_value> value;
+ std::unique_ptr<JSON_value> value;
// start and end are only populated for objects created by parse
- qpdf_offset_t start;
- qpdf_offset_t end;
+ qpdf_offset_t start{0};
+ qpdf_offset_t end{0};
};
std::shared_ptr<Members> m;