Commit 9532dca3a5692188c18f7ab5e959b395ebc80fd4
1 parent
70d985f9
Inline QPDFObjectHandle::setParsedOffset
Part of #729
Showing
2 changed files
with
11 additions
and
11 deletions
include/qpdf/QPDFObjectHandle.hh
| ... | ... | @@ -1588,7 +1588,7 @@ class QPDFObjectHandle |
| 1588 | 1588 | void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only); |
| 1589 | 1589 | void releaseResolved(); |
| 1590 | 1590 | |
| 1591 | - void setParsedOffset(qpdf_offset_t offset); | |
| 1591 | + inline void setParsedOffset(qpdf_offset_t offset); | |
| 1592 | 1592 | void parseContentStream_internal( |
| 1593 | 1593 | std::string const& description, ParserCallbacks* callbacks); |
| 1594 | 1594 | static void parseContentStream_data( |
| ... | ... | @@ -1872,4 +1872,14 @@ QPDFObjectHandle::getOwningQPDF( |
| 1872 | 1872 | return this->qpdf; |
| 1873 | 1873 | } |
| 1874 | 1874 | |
| 1875 | +inline void | |
| 1876 | +QPDFObjectHandle::setParsedOffset(qpdf_offset_t offset) | |
| 1877 | +{ | |
| 1878 | + // This is called during parsing on newly created direct objects, | |
| 1879 | + // so we can't call dereference() here. | |
| 1880 | + if (this->obj.get()) { | |
| 1881 | + this->obj->setParsedOffset(offset); | |
| 1882 | + } | |
| 1883 | +} | |
| 1884 | + | |
| 1875 | 1885 | #endif // QPDFOBJECTHANDLE_HH | ... | ... |
libqpdf/QPDFObjectHandle.cc
| ... | ... | @@ -1944,16 +1944,6 @@ QPDFObjectHandle::getParsedOffset() |
| 1944 | 1944 | } |
| 1945 | 1945 | } |
| 1946 | 1946 | |
| 1947 | -void | |
| 1948 | -QPDFObjectHandle::setParsedOffset(qpdf_offset_t offset) | |
| 1949 | -{ | |
| 1950 | - // This is called during parsing on newly created direct objects, | |
| 1951 | - // so we can't call dereference() here. | |
| 1952 | - if (this->obj.get()) { | |
| 1953 | - this->obj->setParsedOffset(offset); | |
| 1954 | - } | |
| 1955 | -} | |
| 1956 | - | |
| 1957 | 1947 | QPDFObjectHandle |
| 1958 | 1948 | QPDFObjectHandle::newIndirect(QPDF* qpdf, QPDFObjGen const& og) |
| 1959 | 1949 | { | ... | ... |