summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_dictionary.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_dictionary.h')
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index b56e40a6ef..9cf575ddd4 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -98,4 +98,12 @@ class CPDF_Dictionary : public CPDF_Object {
std::map<CFX_ByteString, CPDF_Object*> m_Map;
};
+inline CPDF_Dictionary* ToDictionary(CPDF_Object* obj) {
+ return obj ? obj->AsDictionary() : nullptr;
+}
+
+inline const CPDF_Dictionary* ToDictionary(const CPDF_Object* obj) {
+ return obj ? obj->AsDictionary() : nullptr;
+}
+
#endif // CORE_FPDFAPI_PARSER_CPDF_DICTIONARY_H_