From 057bd659bcbecee2ff8486f3659905f105ed6f53 Mon Sep 17 00:00:00 2001 From: m-holger Date: Sun, 5 Jun 2022 19:26:30 +0100 Subject: Code tidy: remove redundant variable in QPDF::writeJSON --- libqpdf/QPDF_json.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libqpdf/QPDF_json.cc b/libqpdf/QPDF_json.cc index 7af458d1..1db9018c 100644 --- a/libqpdf/QPDF_json.cc +++ b/libqpdf/QPDF_json.cc @@ -790,8 +790,7 @@ QPDF::writeJSON( bool first_object = true; JSON::writeDictionaryOpen(p, first_object, 2); bool all_objects = wanted_objects.empty(); - std::vector objects = getAllObjects(); - for (auto& obj: objects) { + for (auto& obj: getAllObjects()) { std::string key = "obj:" + obj.unparse(); if (all_objects || wanted_objects.count(key)) { if (obj.isStream()) { -- cgit v1.2.3-54-g00ecf