diff options
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 20be3f9d..c2bc30f0 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -916,11 +916,7 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item) void QPDFObjectHandle::setArrayFromVector(std::vector<QPDFObjectHandle> const& items) { - auto array = asArray(); - if (array) { - for (auto const& item: items) { - checkOwnership(item); - } + if (auto array = asArray()) { array->setFromVector(items); } else { typeWarning("array", "ignoring attempt to replace items"); |