diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_string.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h index d99e00c403..01ea8224d4 100644 --- a/core/fpdfapi/parser/cpdf_string.h +++ b/core/fpdfapi/parser/cpdf_string.h @@ -36,4 +36,12 @@ class CPDF_String : public CPDF_Object { FX_BOOL m_bHex; }; +inline CPDF_String* ToString(CPDF_Object* obj) { + return obj ? obj->AsString() : nullptr; +} + +inline const CPDF_String* ToString(const CPDF_Object* obj) { + return obj ? obj->AsString() : nullptr; +} + #endif // CORE_FPDFAPI_PARSER_CPDF_STRING_H_ |