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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp

Issue 1632143002: War on #defines, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add const. Created 4 years, 11 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/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index b3172dd8484cace87e4e38589f3c00a347281727..141618030a387a989c40379e29d607ab14ecbde8 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -338,26 +338,26 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) {
return buf;
}
switch (pObj->GetType()) {
- case PDFOBJ_NULL:
+ case CPDF_Object::NULLOBJ:
buf << " null";
break;
- case PDFOBJ_BOOLEAN:
- case PDFOBJ_NUMBER:
+ case CPDF_Object::BOOLEAN:
+ case CPDF_Object::NUMBER:
buf << " " << pObj->GetString();
break;
- case PDFOBJ_STRING:
+ case CPDF_Object::STRING:
buf << PDF_EncodeString(pObj->GetString(), pObj->AsString()->IsHex());
break;
- case PDFOBJ_NAME: {
+ case CPDF_Object::NAME: {
CFX_ByteString str = pObj->GetString();
buf << "/" << PDF_NameEncode(str);
break;
}
- case PDFOBJ_REFERENCE: {
+ case CPDF_Object::REFERENCE: {
buf << " " << pObj->AsReference()->GetRefObjNum() << " 0 R ";
break;
}
- case PDFOBJ_ARRAY: {
+ case CPDF_Object::ARRAY: {
const CPDF_Array* p = pObj->AsArray();
buf << "[";
for (FX_DWORD i = 0; i < p->GetCount(); i++) {
@@ -371,7 +371,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) {
buf << "]";
break;
}
- case PDFOBJ_DICTIONARY: {
+ case CPDF_Object::DICTIONARY: {
const CPDF_Dictionary* p = pObj->AsDictionary();
buf << "<<";
for (const auto& it : *p) {
@@ -387,7 +387,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) {
buf << ">>";
break;
}
- case PDFOBJ_STREAM: {
+ case CPDF_Object::STREAM: {
const CPDF_Stream* p = pObj->AsStream();
buf << p->GetDict() << "stream\r\n";
CPDF_StreamAcc acc;
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698