From 23d50a2f14db56be4cb4efcc413b8ef44713613f Mon Sep 17 00:00:00 2001 From: m-holger Date: Tue, 9 Aug 2022 21:34:34 +0100 Subject: Remove QPDFObjectHandle::initialized --- libqpdf/QPDFObjectHandle.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libqpdf') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 32988b53..c8611e07 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -236,13 +236,11 @@ LastChar::getLastChar() } QPDFObjectHandle::QPDFObjectHandle() : - initialized(false), qpdf(nullptr) { } QPDFObjectHandle::QPDFObjectHandle(std::shared_ptr const& data) : - initialized(true), qpdf(nullptr), obj(data) { @@ -369,7 +367,7 @@ QPDFObjectHandle::isDirectNull() const // Don't call dereference() -- this is a const method, and we know // objid == 0, so there's nothing to resolve. return ( - initialized && (getObjectID() == 0) && + isInitialized() && (getObjectID() == 0) && (obj->getTypeCode() == QPDFObject::ot_null)); } @@ -2373,7 +2371,7 @@ QPDFObjectHandle::makeDirect(bool allow_streams) void QPDFObjectHandle::assertInitialized() const { - if (!initialized) { + if (!isInitialized()) { throw std::logic_error("operation attempted on uninitialized " "QPDFObjectHandle"); } @@ -2608,7 +2606,7 @@ QPDFObjectHandle::assertPageObject() bool QPDFObjectHandle::dereference() { - if (!this->initialized) { + if (!isInitialized()) { return false; } if (this->obj->getTypeCode() == QPDFObject::ot_unresolved) { -- cgit v1.2.3-54-g00ecf