diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-20 16:38:12 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-20 16:38:12 -0400 |
commit | ce4f95d61f5aa5fb9a5fc6cb8487999a9cf46458 (patch) | |
tree | e94487d8febe420592249615061169e011ce8c3b /fpdfsdk | |
parent | 48cc160caf622bdd1dd5db2dde1935ccaf0b9203 (diff) | |
download | pdfium-ce4f95d61f5aa5fb9a5fc6cb8487999a9cf46458.tar.xz |
Add type cast definitions for CPDF_Boolean.
This CL adds ToBoolean, CPDF_Object::AsBoolean and CPDF_Object::IsBoolean and
updates the src to use them as needed.
BUG=pdfium:201
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1417623005 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/src/javascript/Document.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp index 24f55b03f9..81667cfa04 100644 --- a/fpdfsdk/src/javascript/Document.cpp +++ b/fpdfsdk/src/javascript/Document.cpp @@ -855,9 +855,10 @@ FX_BOOL Document::info(IJS_Context* cc, if (pValueObj->GetType() == PDFOBJ_NUMBER) FXJS_PutObjectNumber(isolate, pObj, wsKey.c_str(), (float)pValueObj->GetNumber()); - if (pValueObj->GetType() == PDFOBJ_BOOLEAN) + if (pValueObj->IsBoolean()) { FXJS_PutObjectBoolean(isolate, pObj, wsKey.c_str(), (bool)pValueObj->GetInteger()); + } } vp << pObj; } |