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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp

Issue 1999313002: Change CPDF_Boolean to use bool instead of FX_BOOL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@interform
Patch Set: rebase Created 4 years, 7 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_boolean.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_security_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
index 27b866a65b52010ba06179754904013faec75448..4ea8f438bd3edfd954032c8fae0fca4c0ce51f6c 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));
}
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_boolean.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_security_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698