From 7bc0f1d828eccbc5a277b75aedc85b7523919f87 Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 27 May 2023 23:49:18 +0100 Subject: Code tidy - Clang-Tidy rule modernize-use-emplace --- libqpdf/QPDFAcroFormDocumentHelper.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc') diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc index aca4bf1f..aefe8d6b 100644 --- a/libqpdf/QPDFAcroFormDocumentHelper.cc +++ b/libqpdf/QPDFAcroFormDocumentHelper.cc @@ -165,7 +165,7 @@ QPDFAcroFormDocumentHelper::getFormFields() analyze(); std::vector result; for (auto const& iter: m->field_to_annotations) { - result.push_back(this->qpdf.getObject(iter.first)); + result.emplace_back(this->qpdf.getObject(iter.first)); } return result; } @@ -279,7 +279,7 @@ QPDFAcroFormDocumentHelper::analyze() annot.warnIfPossible("this widget annotation is not" " reachable from /AcroForm in the document catalog"); m->annotation_to_field[og] = QPDFFormFieldObjectHelper(annot); - m->field_to_annotations[og].push_back(QPDFAnnotationObjectHelper(annot)); + m->field_to_annotations[og].emplace_back(annot); } } } @@ -342,7 +342,7 @@ QPDFAcroFormDocumentHelper::traverseField( if (is_annotation) { QPDFObjectHandle our_field = (is_field ? field : parent); - m->field_to_annotations[our_field.getObjGen()].push_back(QPDFAnnotationObjectHelper(field)); + m->field_to_annotations[our_field.getObjGen()].emplace_back(field); m->annotation_to_field[og] = QPDFFormFieldObjectHelper(our_field); } -- cgit v1.2.3-54-g00ecf