diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h index 6a4f1011c0..ed266778b3 100644 --- a/core/fpdfapi/parser/cpdf_stream.h +++ b/core/fpdfapi/parser/cpdf_stream.h @@ -58,4 +58,12 @@ class CPDF_Stream : public CPDF_Object { IFX_FileRead* m_pFile = nullptr; }; +inline CPDF_Stream* ToStream(CPDF_Object* obj) { + return obj ? obj->AsStream() : nullptr; +} + +inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { + return obj ? obj->AsStream() : nullptr; +} + #endif // CORE_FPDFAPI_PARSER_CPDF_STREAM_H_ |