mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
Change return type of QPDF::resolve to void
This commit is contained in:
parent
356b582cec
commit
ae6e484e23
@ -846,10 +846,10 @@ class QPDF
|
||||
friend class QPDFObjectHandle;
|
||||
|
||||
private:
|
||||
static std::shared_ptr<QPDFObject>
|
||||
static void
|
||||
resolve(QPDF* qpdf, QPDFObjGen const& og)
|
||||
{
|
||||
return qpdf->resolve(og);
|
||||
qpdf->resolve(og);
|
||||
}
|
||||
};
|
||||
friend class Resolver;
|
||||
@ -1168,7 +1168,7 @@ class QPDF
|
||||
std::string const& description,
|
||||
QPDFObjGen const& exp_og,
|
||||
QPDFObjGen& og);
|
||||
std::shared_ptr<QPDFObject> resolve(QPDFObjGen const& og);
|
||||
void resolve(QPDFObjGen const& og);
|
||||
void resolveObjectsInStream(int obj_stream_number);
|
||||
void stopOnError(std::string const& message);
|
||||
QPDFObjectHandle reserveObjectIfNotExists(QPDFObjGen const& og);
|
||||
|
@ -1926,12 +1926,12 @@ QPDF::readObjectAtOffset(
|
||||
return oh;
|
||||
}
|
||||
|
||||
std::shared_ptr<QPDFObject>
|
||||
void
|
||||
QPDF::resolve(QPDFObjGen const& og)
|
||||
{
|
||||
if (isCached(og) && !isUnresolved(og)) {
|
||||
// We only need to resolve unresolved objects
|
||||
return m->obj_cache[og].object;
|
||||
return;
|
||||
}
|
||||
|
||||
// Check object cache before checking xref table. This allows us
|
||||
@ -1947,9 +1947,8 @@ QPDF::resolve(QPDFObjGen const& og)
|
||||
"",
|
||||
this->m->file->getLastOffset(),
|
||||
("loop detected resolving object " + og.unparse(' ')));
|
||||
|
||||
updateCache(og, QPDF_Null::create(), -1, -1);
|
||||
return m->obj_cache[og].object;
|
||||
return;
|
||||
}
|
||||
ResolveRecorder rr(this, og);
|
||||
|
||||
@ -1998,11 +1997,10 @@ QPDF::resolve(QPDFObjGen const& og)
|
||||
updateCache(og, QPDF_Null::create(), -1, -1);
|
||||
}
|
||||
|
||||
std::shared_ptr<QPDFObject> result(this->m->obj_cache[og].object);
|
||||
auto result(this->m->obj_cache[og].object);
|
||||
if (!result->hasDescription()) {
|
||||
result->setDescription(this, ("object " + og.unparse(' ')));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2596,7 +2596,7 @@ QPDFObjectHandle::dereference()
|
||||
return false;
|
||||
}
|
||||
if (this->obj->isUnresolved()) {
|
||||
this->obj = QPDF::Resolver::resolve(this->qpdf, getObjGen());
|
||||
QPDF::Resolver::resolve(this->qpdf, getObjGen());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user