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

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

Issue 1857713003: Rename GetCStr and GetPtr to match CFX_ByteString (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 8 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
Index: core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
index d04a682b77cfa05bc56b3854e46ec38cc8be6965..3deecf54ff2ab337bcca7a8f60410cdb2d438da9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
@@ -662,7 +662,7 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
// Earlier version of PDF specification doesn't require EOL marker before
// 'endstream' keyword. If keyword 'endstream' follows the bytes in
// specified length, it signals the end of stream.
- if (FXSYS_memcmp(m_WordBuffer, kEndStreamStr.GetPtr(),
+ if (FXSYS_memcmp(m_WordBuffer, kEndStreamStr.raw_str(),
kEndStreamStr.GetLength()) == 0) {
bSearchForKeyword = FALSE;
}
@@ -774,8 +774,8 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
int numMarkers = ReadEOLMarkers(m_Pos);
if (m_WordSize == static_cast<unsigned int>(kEndObjStr.GetLength()) &&
numMarkers != 0 &&
- FXSYS_memcmp(m_WordBuffer, kEndObjStr.GetPtr(), kEndObjStr.GetLength()) ==
- 0) {
+ FXSYS_memcmp(m_WordBuffer, kEndObjStr.raw_str(),
+ kEndObjStr.GetLength()) == 0) {
m_Pos = streamStartPos;
}
return pStream;
@@ -849,7 +849,7 @@ FX_BOOL CPDF_SyntaxParser::SearchWord(const CFX_ByteStringC& tag,
if (!bForward)
offset = taglen - 1;
- const uint8_t* tag_data = tag.GetPtr();
+ const uint8_t* tag_data = tag.raw_str();
uint8_t byte;
while (1) {
if (bForward) {
@@ -921,7 +921,7 @@ int32_t CPDF_SyntaxParser::SearchMultiWord(const CFX_ByteStringC& tags,
if (tags[i] == 0) {
uint32_t len = i - start;
max_len = std::max(len, max_len);
- patterns[itag].m_pTag = tags.GetCStr() + start;
+ patterns[itag].m_pTag = tags.c_str() + start;
patterns[itag].m_Len = len;
patterns[itag].m_Offset = 0;
start = i + 1;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_simple_parser_unittest.cpp ('k') | core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698