From 073808aa50f0c78e2d6fea4f56f0b814b314eb42 Mon Sep 17 00:00:00 2001 From: m-holger Date: Tue, 26 Jul 2022 12:37:50 +0100 Subject: Code tidy : replace 0 with nullptr or true --- libqpdf/Pl_Flate.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libqpdf/Pl_Flate.cc') diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc index 3ce7f434..4183b7e4 100644 --- a/libqpdf/Pl_Flate.cc +++ b/libqpdf/Pl_Flate.cc @@ -13,7 +13,7 @@ Pl_Flate::Members::Members(size_t out_bufsize, action_e action) : out_bufsize(out_bufsize), action(action), initialized(false), - zdata(0) + zdata(nullptr) { this->outbuf = QUtil::make_shared_array(out_bufsize); // Indirect through zdata to reach the z_stream so we don't have @@ -29,10 +29,10 @@ Pl_Flate::Members::Members(size_t out_bufsize, action_e action) : } z_stream& zstream = *(static_cast(this->zdata)); - zstream.zalloc = 0; - zstream.zfree = 0; - zstream.opaque = 0; - zstream.next_in = 0; + zstream.zalloc = nullptr; + zstream.zfree = nullptr; + zstream.opaque = nullptr; + zstream.next_in = nullptr; zstream.avail_in = 0; zstream.next_out = this->outbuf.get(); zstream.avail_out = QIntC::to_uint(out_bufsize); @@ -50,7 +50,7 @@ Pl_Flate::Members::~Members() } delete static_cast(this->zdata); - this->zdata = 0; + this->zdata = nullptr; } Pl_Flate::Pl_Flate( @@ -86,7 +86,7 @@ Pl_Flate::warn(char const* msg, int code) void Pl_Flate::write(unsigned char const* data, size_t len) { - if (this->m->outbuf.get() == 0) { + if (this->m->outbuf.get() == nullptr) { throw std::logic_error( this->identifier + ": Pl_Flate: write() called after finish() called"); @@ -227,7 +227,7 @@ Pl_Flate::finish() checkError("End", err); } - this->m->outbuf = 0; + this->m->outbuf = nullptr; } } catch (std::exception& e) { try { -- cgit v1.2.3-54-g00ecf