aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Array.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDF_Array.cc')
-rw-r--r--libqpdf/QPDF_Array.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/QPDF_Array.cc b/libqpdf/QPDF_Array.cc
index def40e9b..5a80cdf5 100644
--- a/libqpdf/QPDF_Array.cc
+++ b/libqpdf/QPDF_Array.cc
@@ -264,10 +264,11 @@ QPDF_Array::insertItem(int at, QPDFObjectHandle const& item)
}
void
-QPDF_Array::appendItem(QPDFObjectHandle const& item)
+QPDF_Array::push_back(QPDFObjectHandle const& item)
{
+ checkOwnership(item);
if (sparse) {
- sp_elements.append(item);
+ sp_elements.elements[sp_elements.n_elements++] = item.getObj();
} else {
elements.push_back(item.getObj());
}