aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_json.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-06-05 20:26:30 +0200
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-06-06 00:46:21 +0200
commit057bd659bcbecee2ff8486f3659905f105ed6f53 (patch)
treed53f2a213ab87a3c1a2605349fea5199e4cd6d76 /libqpdf/QPDF_json.cc
parentf51e28a094e63ffce1087d3a1f9e3e9832f01b02 (diff)
downloadqpdf-057bd659bcbecee2ff8486f3659905f105ed6f53.tar.zst
Code tidy: remove redundant variable in QPDF::writeJSON
Diffstat (limited to 'libqpdf/QPDF_json.cc')
-rw-r--r--libqpdf/QPDF_json.cc3
1 files changed, 1 insertions, 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<QPDFObjectHandle> 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()) {