summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.h')
-rw-r--r--core/fpdfapi/parser/cpdf_array.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index da9677e927..46e9d47667 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -70,4 +70,12 @@ class CPDF_Array : public CPDF_Object {
std::vector<CPDF_Object*> m_Objects;
};
+inline CPDF_Array* ToArray(CPDF_Object* obj) {
+ return obj ? obj->AsArray() : nullptr;
+}
+
+inline const CPDF_Array* ToArray(const CPDF_Object* obj) {
+ return obj ? obj->AsArray() : nullptr;
+}
+
#endif // CORE_FPDFAPI_PARSER_CPDF_ARRAY_H_