2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Use QPDFObjGen::set in QPDFJob::getWantedJSONObjects

This commit is contained in:
m-holger 2023-05-18 14:42:27 +01:00
parent 0c45bd8749
commit 9db2965f62
2 changed files with 4 additions and 6 deletions

View File

@ -571,7 +571,7 @@ class QPDFJob
// JSON
void doJSON(QPDF& pdf, Pipeline*);
std::set<QPDFObjGen> getWantedJSONObjects();
QPDFObjGen::set getWantedJSONObjects();
void doJSONObject(
Pipeline* p, bool& first, std::string const& key, QPDFObjectHandle&);
void doJSONObjects(Pipeline* p, bool& first, QPDF& pdf);

View File

@ -1001,18 +1001,16 @@ QPDFJob::parse_object_id(
}
}
std::set<QPDFObjGen>
QPDFObjGen::set
QPDFJob::getWantedJSONObjects()
{
std::set<QPDFObjGen> wanted_og;
QPDFObjGen::set wanted_og;
for (auto const& iter: m->json_objects) {
bool trailer;
int obj = 0;
int gen = 0;
parse_object_id(iter, trailer, obj, gen);
if (obj) {
wanted_og.insert(QPDFObjGen(obj, gen));
}
wanted_og.add(QPDFObjGen(obj, gen));
}
return wanted_og;
}