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

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 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 | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 7e68740e59d3232ff1ab145747c5839425782dae..fa6bb2ef5386c4022b75980f568314060a26bb83 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -104,7 +104,7 @@ CPDF_CustomAccess::CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess)
m_BufferOffset = (FX_DWORD)-1;
}
-FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, FX_BYTE& ch)
+FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch)
{
if (pos >= m_FileAccess.m_FileLen) return FALSE;
if (m_BufferOffset == (FX_DWORD)-1 || pos < m_BufferOffset || pos >= m_BufferOffset + 512) {
@@ -302,7 +302,7 @@ extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code);
class CMemFile final : public IFX_FileRead
{
public:
- CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
+ CMemFile(uint8_t* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
virtual void Release() {delete this;}
virtual FX_FILESIZE GetSize() {return m_size;}
@@ -320,14 +320,14 @@ public:
return TRUE;
}
private:
- FX_BYTE* m_pBuf;
+ uint8_t* m_pBuf;
FX_FILESIZE m_size;
};
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password)
{
CPDF_Parser* pParser = FX_NEW CPDF_Parser;
pParser->SetPassword(password);
- CMemFile* pMemFile = FX_NEW CMemFile((FX_BYTE*)data_buf, size);
+ CMemFile* pMemFile = new CMemFile((uint8_t*)data_buf, size);
FX_DWORD err_code = pParser->StartParse(pMemFile);
if (err_code) {
delete pParser;
« no previous file with comments | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698