aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_PNGFilter.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-04 16:10:19 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-04 19:12:37 +0100
commit9044a24097565c1a8eb542ae0eabb2539b3cc62b (patch)
tree0cc501c50bdacab8b58197623b7a17304bfff48f /libqpdf/Pl_PNGFilter.cc
parentf727bc94432905d79af23cf0aef14854965da2cd (diff)
downloadqpdf-9044a24097565c1a8eb542ae0eabb2539b3cc62b.tar.zst
PointerHolder: deprecate getPointer() and getRefcount()
Use get() and use_count() instead. Add #define NO_POINTERHOLDER_DEPRECATION to remove deprecation markers for these only. This commit also removes all deprecated PointerHolder API calls from qpdf's code except in PointerHolder's test suite, which must continue to test the deprecated APIs.
Diffstat (limited to 'libqpdf/Pl_PNGFilter.cc')
-rw-r--r--libqpdf/Pl_PNGFilter.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libqpdf/Pl_PNGFilter.cc b/libqpdf/Pl_PNGFilter.cc
index 6a3bc5b8..a0841944 100644
--- a/libqpdf/Pl_PNGFilter.cc
+++ b/libqpdf/Pl_PNGFilter.cc
@@ -49,10 +49,10 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next,
true, new unsigned char[this->bytes_per_row + 1]);
this->buf2 = PointerHolder<unsigned char>(
true, new unsigned char[this->bytes_per_row + 1]);
- memset(this->buf1.getPointer(), 0, this->bytes_per_row + 1);
- memset(this->buf2.getPointer(), 0, this->bytes_per_row + 1);
- this->cur_row = this->buf1.getPointer();
- this->prev_row = this->buf2.getPointer();
+ 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();
+ this->prev_row = this->buf2.get();
// number of bytes per incoming row
this->incoming = (action == a_encode ?
@@ -81,7 +81,7 @@ Pl_PNGFilter::write(unsigned char* data, size_t len)
// Swap rows
unsigned char* t = this->prev_row;
this->prev_row = this->cur_row;
- this->cur_row = t ? t : this->buf2.getPointer();
+ this->cur_row = t ? t : this->buf2.get();
memset(this->cur_row, 0, this->bytes_per_row + 1);
left = this->incoming;
this->pos = 0;
@@ -269,7 +269,7 @@ Pl_PNGFilter::finish()
processRow();
}
this->prev_row = 0;
- this->cur_row = buf1.getPointer();
+ this->cur_row = buf1.get();
this->pos = 0;
memset(this->cur_row, 0, this->bytes_per_row + 1);