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

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

Issue 809993004: Get rid of FX_LPCSTR cast. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Indent Created 6 years 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/fpdfdoc/doc_form.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 7559bcee919c8cfe4699a75e3d9d98ea167f9e65..e5e68c2f5c37fb32dfbc3a4dd3be96aefc658b52 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -284,14 +284,14 @@ CFX_ByteString PDF_NameDecode(FX_BSTR bstr)
}
CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig)
{
- if (FXSYS_memchr((FX_LPCSTR)orig, '#', orig.GetLength()) == NULL) {
+ if (FXSYS_memchr(orig.c_str(), '#', orig.GetLength()) == NULL) {
return orig;
}
return PDF_NameDecode(CFX_ByteStringC(orig));
}
CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig)
{
- FX_LPBYTE src_buf = (FX_LPBYTE)(FX_LPCSTR)orig;
+ FX_LPBYTE src_buf = (FX_LPBYTE)orig.c_str();
int src_len = orig.GetLength();
int dest_len = 0;
int i;
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698