2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-05 11:50:53 +00:00

Inline QPDFObjectHandle::setParsedOffset

Part of #729
This commit is contained in:
m-holger 2022-08-30 14:55:45 +01:00
parent 70d985f942
commit 9532dca3a5
2 changed files with 11 additions and 11 deletions

View File

@ -1588,7 +1588,7 @@ class QPDFObjectHandle
void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only);
void releaseResolved();
void setParsedOffset(qpdf_offset_t offset);
inline void setParsedOffset(qpdf_offset_t offset);
void parseContentStream_internal(
std::string const& description, ParserCallbacks* callbacks);
static void parseContentStream_data(
@ -1872,4 +1872,14 @@ QPDFObjectHandle::getOwningQPDF(
return this->qpdf;
}
inline void
QPDFObjectHandle::setParsedOffset(qpdf_offset_t offset)
{
// This is called during parsing on newly created direct objects,
// so we can't call dereference() here.
if (this->obj.get()) {
this->obj->setParsedOffset(offset);
}
}
#endif // QPDFOBJECTHANDLE_HH

View File

@ -1944,16 +1944,6 @@ QPDFObjectHandle::getParsedOffset()
}
}
void
QPDFObjectHandle::setParsedOffset(qpdf_offset_t offset)
{
// This is called during parsing on newly created direct objects,
// so we can't call dereference() here.
if (this->obj.get()) {
this->obj->setParsedOffset(offset);
}
}
QPDFObjectHandle
QPDFObjectHandle::newIndirect(QPDF* qpdf, QPDFObjGen const& og)
{