summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_number.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_number.h')
-rw-r--r--core/fpdfapi/parser/cpdf_number.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h
index 8c708e93f1..a5efc1423e 100644
--- a/core/fpdfapi/parser/cpdf_number.h
+++ b/core/fpdfapi/parser/cpdf_number.h
@@ -41,4 +41,12 @@ class CPDF_Number : public CPDF_Object {
};
};
+inline CPDF_Number* ToNumber(CPDF_Object* obj) {
+ return obj ? obj->AsNumber() : nullptr;
+}
+
+inline const CPDF_Number* ToNumber(const CPDF_Object* obj) {
+ return obj ? obj->AsNumber() : nullptr;
+}
+
#endif // CORE_FPDFAPI_PARSER_CPDF_NUMBER_H_