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

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

Issue 1558083002: Change CPDF_SyntaxParser::GetNextWord() to not pass by non-const ref. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase 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/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.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_fdf.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index d0154d118edaeb2f827e48d8d0b8331e5477e79a..f36313e1dcee2726d29ac2f2d1cb7439ebffc990 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -46,15 +46,15 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
CPDF_SyntaxParser parser;
parser.InitParser(m_pFile, 0);
while (1) {
- FX_BOOL bNumber;
- CFX_ByteString word = parser.GetNextWord(bNumber);
+ bool bNumber;
+ CFX_ByteString word = parser.GetNextWord(&bNumber);
if (bNumber) {
FX_DWORD objnum = FXSYS_atoi(word);
- word = parser.GetNextWord(bNumber);
+ word = parser.GetNextWord(&bNumber);
if (!bNumber) {
break;
}
- word = parser.GetNextWord(bNumber);
+ word = parser.GetNextWord(nullptr);
if (word != "obj") {
break;
}
@@ -63,7 +63,7 @@ void CFDF_Document::ParseStream(IFX_FileRead* pFile, FX_BOOL bOwnFile) {
break;
}
InsertIndirectObject(objnum, pObj);
- word = parser.GetNextWord(bNumber);
+ word = parser.GetNextWord(nullptr);
if (word != "endobj") {
break;
}
« no previous file with comments | « core/include/fpdfapi/fpdf_parser.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698