Commit 057bd659bcbecee2ff8486f3659905f105ed6f53

Authored by m-holger
Committed by Jay Berkenbilt
1 parent f51e28a0

Code tidy: remove redundant variable in QPDF::writeJSON

Showing 1 changed file with 1 additions and 2 deletions
libqpdf/QPDF_json.cc
@@ -790,8 +790,7 @@ QPDF::writeJSON( @@ -790,8 +790,7 @@ QPDF::writeJSON(
790 bool first_object = true; 790 bool first_object = true;
791 JSON::writeDictionaryOpen(p, first_object, 2); 791 JSON::writeDictionaryOpen(p, first_object, 2);
792 bool all_objects = wanted_objects.empty(); 792 bool all_objects = wanted_objects.empty();
793 - std::vector<QPDFObjectHandle> objects = getAllObjects();  
794 - for (auto& obj: objects) { 793 + for (auto& obj: getAllObjects()) {
795 std::string key = "obj:" + obj.unparse(); 794 std::string key = "obj:" + obj.unparse();
796 if (all_objects || wanted_objects.count(key)) { 795 if (all_objects || wanted_objects.count(key)) {
797 if (obj.isStream()) { 796 if (obj.isStream()) {