diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-07 17:29:12 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-07 23:38:22 +0100 |
commit | 3f22bea084d8d64cba1a433726abd709caf8456b (patch) | |
tree | 4bf3deb37860d144f36d4b651bb7d1a6b4060876 /libqpdf/Pl_PNGFilter.cc | |
parent | 40f1946df8acb0bb7fefdc3ab31f6285bb11d032 (diff) | |
download | qpdf-3f22bea084d8d64cba1a433726abd709caf8456b.tar.zst |
Use make_array_pointer_holder
This will be able to be replaced with QUtil::make_shared_array
Diffstat (limited to 'libqpdf/Pl_PNGFilter.cc')
-rw-r--r-- | libqpdf/Pl_PNGFilter.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libqpdf/Pl_PNGFilter.cc b/libqpdf/Pl_PNGFilter.cc index 5f2ae54d..b9aa6b2b 100644 --- a/libqpdf/Pl_PNGFilter.cc +++ b/libqpdf/Pl_PNGFilter.cc @@ -1,6 +1,8 @@ #include <qpdf/Pl_PNGFilter.hh> #include <qpdf/QTC.hh> +#include <qpdf/QUtil.hh> + #include <stdexcept> #include <string.h> #include <limits.h> @@ -46,10 +48,10 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, "PNGFilter created with invalid columns value"); } this->bytes_per_row = bpr & UINT_MAX; - this->buf1 = PointerHolder<unsigned char>( - true, new unsigned char[this->bytes_per_row + 1]); - this->buf2 = PointerHolder<unsigned char>( - true, new unsigned char[this->bytes_per_row + 1]); + this->buf1 = make_array_pointer_holder<unsigned char>( + this->bytes_per_row + 1); + this->buf2 = make_array_pointer_holder<unsigned char>( + this->bytes_per_row + 1); memset(this->buf1.get(), 0, this->bytes_per_row + 1); memset(this->buf2.get(), 0, this->bytes_per_row + 1); this->cur_row = this->buf1.get(); |