summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_boolean.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_boolean.h')
-rw-r--r--core/fpdfapi/parser/cpdf_boolean.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_boolean.h b/core/fpdfapi/parser/cpdf_boolean.h
index 89ed17d743..91b99f6dd2 100644
--- a/core/fpdfapi/parser/cpdf_boolean.h
+++ b/core/fpdfapi/parser/cpdf_boolean.h
@@ -32,4 +32,12 @@ class CPDF_Boolean : public CPDF_Object {
bool m_bValue;
};
+inline CPDF_Boolean* ToBoolean(CPDF_Object* obj) {
+ return obj ? obj->AsBoolean() : nullptr;
+}
+
+inline const CPDF_Boolean* ToBoolean(const CPDF_Object* obj) {
+ return obj ? obj->AsBoolean() : nullptr;
+}
+
#endif // CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_