diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_reference.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_reference.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h index 8c57d85e0e..5221832f80 100644 --- a/core/fpdfapi/parser/cpdf_reference.h +++ b/core/fpdfapi/parser/cpdf_reference.h @@ -47,4 +47,12 @@ class CPDF_Reference : public CPDF_Object { uint32_t m_RefObjNum; }; +inline CPDF_Reference* ToReference(CPDF_Object* obj) { + return obj ? obj->AsReference() : nullptr; +} + +inline const CPDF_Reference* ToReference(const CPDF_Object* obj) { + return obj ? obj->AsReference() : nullptr; +} + #endif // CORE_FPDFAPI_PARSER_CPDF_REFERENCE_H_ |