mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-11 15:40:58 +00:00
Use QPDFObjGen::set in QPDF::getCompressibleObjGens
This commit is contained in:
parent
53f6c0a55a
commit
aeb66311c2
@ -2511,7 +2511,7 @@ QPDF::getCompressibleObjGens()
|
||||
QPDFObjectHandle encryption_dict = this->m->trailer.getKey("/Encrypt");
|
||||
QPDFObjGen encryption_dict_og = encryption_dict.getObjGen();
|
||||
|
||||
std::set<QPDFObjGen> visited;
|
||||
QPDFObjGen::set visited;
|
||||
std::list<QPDFObjectHandle> queue;
|
||||
queue.push_front(this->m->trailer);
|
||||
std::vector<QPDFObjGen> result;
|
||||
@ -2520,7 +2520,7 @@ QPDF::getCompressibleObjGens()
|
||||
queue.pop_front();
|
||||
if (obj.isIndirect()) {
|
||||
QPDFObjGen og = obj.getObjGen();
|
||||
if (visited.count(og)) {
|
||||
if (!visited.add(og)) {
|
||||
QTC::TC("qpdf", "QPDF loop detected traversing objects");
|
||||
continue;
|
||||
}
|
||||
@ -2532,7 +2532,6 @@ QPDF::getCompressibleObjGens()
|
||||
obj.hasKey("/Contents")))) {
|
||||
result.push_back(og);
|
||||
}
|
||||
visited.insert(og);
|
||||
}
|
||||
if (obj.isStream()) {
|
||||
QPDFObjectHandle dict = obj.getDict();
|
||||
|
Loading…
Reference in New Issue
Block a user