diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-06 19:53:16 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-07 23:38:22 +0100 |
commit | 40f1946df8acb0bb7fefdc3ab31f6285bb11d032 (patch) | |
tree | 87776a2a5f628bca1f4a1a0f46c4544aac7749e2 /libqpdf/InputSource.cc | |
parent | dd4f30226f3d4738e198dfcb944ce4cdc7e50a86 (diff) | |
download | qpdf-40f1946df8acb0bb7fefdc3ab31f6285bb11d032.tar.zst |
Replace PointerHolder arrays with shared_ptr arrays where possible
Replace PointerHolder arrays wherever it can be done without breaking ABI.
Diffstat (limited to 'libqpdf/InputSource.cc')
-rw-r--r-- | libqpdf/InputSource.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/InputSource.cc b/libqpdf/InputSource.cc index f9f63f17..3520ebf2 100644 --- a/libqpdf/InputSource.cc +++ b/libqpdf/InputSource.cc @@ -37,8 +37,8 @@ InputSource::readLine(size_t max_line_length) // point to position the file had when this method was called. qpdf_offset_t offset = this->tell(); - char* buf = new char[max_line_length + 1]; - PointerHolder<char> bp(true, buf); + auto bp = std::make_unique<char[]>(max_line_length + 1); + char* buf = bp.get(); memset(buf, '\0', max_line_length + 1); this->read(buf, max_line_length); this->seek(offset, SEEK_SET); |