diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_name.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_name.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h index e6b460de39..cfc2fe641a 100644 --- a/core/fpdfapi/parser/cpdf_name.h +++ b/core/fpdfapi/parser/cpdf_name.h @@ -29,4 +29,12 @@ class CPDF_Name : public CPDF_Object { CFX_ByteString m_Name; }; +inline CPDF_Name* ToName(CPDF_Object* obj) { + return obj ? obj->AsName() : nullptr; +} + +inline const CPDF_Name* ToName(const CPDF_Object* obj) { + return obj ? obj->AsName() : nullptr; +} + #endif // CORE_FPDFAPI_PARSER_CPDF_NAME_H_ |