2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-28 04:59:05 +00:00

Code tidy: remove redundant variable in QPDF::writeJSON

This commit is contained in:
m-holger 2022-06-05 19:26:30 +01:00 committed by Jay Berkenbilt
parent f51e28a094
commit 057bd659bc

View File

@ -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()) {