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

Unified Diff: fpdfsdk/src/fpdfdoc.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 | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfdoc.cpp
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index e974ffbcf245a561c39f7a6d9305139a4e9edfdc..19ca06ca276416e0df34c3f7e432b423ca910cc1 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -107,7 +107,7 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, FP
CFX_ByteString path = Action.GetURI(pDoc);
unsigned long len = path.GetLength() + 1;
if (buffer != NULL && buflen >= len)
- FXSYS_memcpy(buffer, (FX_LPCSTR)path, len);
+ FXSYS_memcpy(buffer, path.c_str(), len);
return len;
}
@@ -251,7 +251,7 @@ DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTR
CFX_ByteString bstr = text.UTF16LE_Encode();
unsigned long len = bstr.GetLength();
if (buffer != NULL && buflen >= len+2) {
- FXSYS_memcpy(buffer, (FX_LPCSTR)bstr, len);
+ FXSYS_memcpy(buffer, bstr.c_str(), len);
// use double zero as trailer
((FX_BYTE*)buffer)[len] = ((FX_BYTE*)buffer)[len+1] = 0;
}
« no previous file with comments | « fpdfsdk/src/fpdf_flatten.cpp ('k') | fpdfsdk/src/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698