summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-23 17:54:02 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-23 17:54:02 -0700
commitded3634145b214b11212a7c53faa8ba15a1789ca (patch)
treefe715734e07dc73b3b63d9223d59e7a2799b557e /core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
parenta2d699f1462050833f959ebcf24853c2a6a10f72 (diff)
downloadpdfium-ded3634145b214b11212a7c53faa8ba15a1789ca.tar.xz
Change CPDF_Boolean to use bool instead of FX_BOOL.
Review-Url: https://codereview.chromium.org/1999313002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
index 27b866a65b..4ea8f438bd 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
@@ -96,10 +96,10 @@ FX_FLOAT CPDF_Dictionary::GetNumberBy(const CFX_ByteString& key) const {
return p ? p->GetNumber() : 0;
}
-FX_BOOL CPDF_Dictionary::GetBooleanBy(const CFX_ByteString& key,
- FX_BOOL bDefault) const {
+bool CPDF_Dictionary::GetBooleanBy(const CFX_ByteString& key,
+ bool bDefault) const {
CPDF_Object* p = GetObjectBy(key);
- return ToBoolean(p) ? p->GetInteger() : bDefault;
+ return ToBoolean(p) ? p->GetInteger() != 0 : bDefault;
}
CPDF_Dictionary* CPDF_Dictionary::GetDictBy(const CFX_ByteString& key) const {
@@ -224,7 +224,7 @@ void CPDF_Dictionary::SetAtNumber(const CFX_ByteString& key, FX_FLOAT f) {
SetAt(key, new CPDF_Number(f));
}
-void CPDF_Dictionary::SetAtBoolean(const CFX_ByteString& key, FX_BOOL bValue) {
+void CPDF_Dictionary::SetAtBoolean(const CFX_ByteString& key, bool bValue) {
SetAt(key, new CPDF_Boolean(bValue));
}