diff options
author | thestig <thestig@chromium.org> | 2016-05-23 17:54:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-23 17:54:02 -0700 |
commit | ded3634145b214b11212a7c53faa8ba15a1789ca (patch) | |
tree | fe715734e07dc73b3b63d9223d59e7a2799b557e /core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp | |
parent | a2d699f1462050833f959ebcf24853c2a6a10f72 (diff) | |
download | pdfium-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.cpp | 8 |
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)); } |