From cedb37caa153abfd92a91b2e39a6f32601be826c Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 10 Dec 2022 19:05:12 +0000 Subject: Refactor QPDF_Array::appendItem and rename to push_back --- libqpdf/SparseOHArray.cc | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'libqpdf/SparseOHArray.cc') diff --git a/libqpdf/SparseOHArray.cc b/libqpdf/SparseOHArray.cc index c82bf145..48716deb 100644 --- a/libqpdf/SparseOHArray.cc +++ b/libqpdf/SparseOHArray.cc @@ -4,24 +4,6 @@ static const QPDFObjectHandle null_oh = QPDFObjectHandle::newNull(); -void -SparseOHArray::append(QPDFObjectHandle oh) -{ - if (!oh.isDirectNull()) { - this->elements[this->n_elements] = oh.getObj(); - } - ++this->n_elements; -} - -void -SparseOHArray::append(std::shared_ptr&& obj) -{ - if (obj->getTypeCode() != ::ot_null || !obj->getObjGen().isIndirect()) { - this->elements[this->n_elements] = std::move(obj); - } - ++this->n_elements; -} - QPDFObjectHandle SparseOHArray::at(int idx) const { -- cgit v1.2.3-70-g09d2