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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.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/include/fxcrt/fx_string.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 4a34de1c1633a5927e77def5bdb070e9bbfc6c23..7795f1fe91a690cd6b36914395991c5769b28e37 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -1107,7 +1107,7 @@ FX_INT32 CPDF_Creator::WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj,
break;
}
CPDF_Encryptor encryptor;
- encryptor.Initialize(m_pCryptoHandler, objnum, (FX_LPBYTE)(FX_LPCSTR)str, str.GetLength());
+ encryptor.Initialize(m_pCryptoHandler, objnum, (FX_LPBYTE)str.c_str(), str.GetLength());
CFX_ByteString content = PDF_EncodeString(CFX_ByteString((FX_LPCSTR)encryptor.m_pData, encryptor.m_dwSize), bHex);
if ((len = m_File.AppendString(content)) < 0) {
return -1;
@@ -1665,12 +1665,12 @@ FX_INT32 CPDF_Creator::WriteDoc_Stage3(IFX_Pause *pPause)
} else {
str.Format("%d %d\r\n", i, j - i);
}
- if (m_File.AppendBlock((FX_LPCSTR)str, str.GetLength()) < 0) {
+ if (m_File.AppendBlock(str.c_str(), str.GetLength()) < 0) {
return -1;
}
while (i < j) {
str.Format("%010d 00000 n\r\n", m_ObjectOffset[i ++]);
- if (m_File.AppendBlock((FX_LPCSTR)str, str.GetLength()) < 0) {
+ if (m_File.AppendBlock(str.c_str(), str.GetLength()) < 0) {
return -1;
}
}
@@ -1707,13 +1707,13 @@ FX_INT32 CPDF_Creator::WriteDoc_Stage3(IFX_Pause *pPause)
} else {
str.Format("%d %d\r\n", objnum, j - i);
}
- if (m_File.AppendBlock((FX_LPCSTR)str, str.GetLength()) < 0) {
+ if (m_File.AppendBlock(str.c_str(), str.GetLength()) < 0) {
return -1;
}
while (i < j) {
objnum = m_NewObjNumArray.ElementAt(i++);
str.Format("%010d 00000 n\r\n", m_ObjectOffset[objnum]);
- if (m_File.AppendBlock((FX_LPCSTR)str, str.GetLength()) < 0) {
+ if (m_File.AppendBlock(str.c_str(), str.GetLength()) < 0) {
return -1;
}
}
« no previous file with comments | « core/include/fxcrt/fx_string.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698