diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-03-21 17:18:28 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2023-04-02 10:24:08 +0200 |
commit | a2edf27b76cf68474190229dad904ca661e9bb42 (patch) | |
tree | ba44dcdc8abaf11ed5e946b1ad95b0c62d609841 /libqpdf/qpdf-c.cc | |
parent | f8e39253be9d1806ccdb88d8117b7418f2045da1 (diff) | |
download | qpdf-a2edf27b76cf68474190229dad904ca661e9bb42.tar.zst |
Initialize _qpdf_data members
Diffstat (limited to 'libqpdf/qpdf-c.cc')
-rw-r--r-- | libqpdf/qpdf-c.cc | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/libqpdf/qpdf-c.cc b/libqpdf/qpdf-c.cc index cb104c73..7feabd1c 100644 --- a/libqpdf/qpdf-c.cc +++ b/libqpdf/qpdf-c.cc @@ -27,7 +27,7 @@ struct _qpdf_error struct _qpdf_data { - _qpdf_data(); + _qpdf_data() = default; ~_qpdf_data() = default; std::shared_ptr<QPDF> qpdf; @@ -39,31 +39,23 @@ struct _qpdf_data std::string tmp_string; // Parameters for functions we call - char const* filename; // or description - char const* buffer; - unsigned long long size; - char const* password; - bool write_memory; + char const* filename{nullptr}; // or description + char const* buffer{nullptr}; + unsigned long long size{0}; + char const* password{nullptr}; + bool write_memory{false}; std::shared_ptr<Buffer> output_buffer; // QPDFObjectHandle support - bool silence_errors; - bool oh_error_occurred; + bool silence_errors{false}; + bool oh_error_occurred{false}; std::map<qpdf_oh, std::shared_ptr<QPDFObjectHandle>> oh_cache; - qpdf_oh next_oh; + qpdf_oh next_oh{0}; std::set<std::string> cur_iter_dict_keys; std::set<std::string>::const_iterator dict_iter; std::string cur_dict_key; }; -_qpdf_data::_qpdf_data() : - write_memory(false), - silence_errors(false), - oh_error_occurred(false), - next_oh(0) -{ -} - // must set qpdf->filename and qpdf->password static void call_read(qpdf_data qpdf) |