Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: fpdfsdk/src/javascript/Document.cpp

Issue 1417623005: Add type cast definitions for CPDF_Boolean. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/javascript/Document.cpp
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 24f55b03f91e350a0703cb5adbccfc101fb1e830..ce6e69a5e40a26277d37396ad177ca8d92c07f05 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -855,7 +855,7 @@ 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())
Lei Zhang 2015/10/20 20:20:16 nit: add braces while you are here.
dsinclair 2015/10/20 20:38:07 Done.
FXJS_PutObjectBoolean(isolate, pObj, wsKey.c_str(),
(bool)pValueObj->GetInteger());
}

Powered by Google App Engine
This is Rietveld 408576698