From fbf266fc0ea4be2523cbb901a641aa33f0035662 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 11:09:44 -0700 Subject: Remove typdefs for pointer types in fx_system.h. This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003 --- fpdfsdk/src/fpdfview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/src/fpdfview.cpp') diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index efb1148305..96d1ff0e31 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -30,7 +30,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t si if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) { return FALSE; } - return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(FX_LPBYTE) buffer, size); + return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(uint8_t*) buffer, size); } //0 bit: FPDF_POLICY_MACHINETIME_ACCESS @@ -188,7 +188,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BY CPDF_Parser* pParser = new CPDF_Parser; pParser->SetPassword(password); - FX_DWORD err_code = pParser->StartParse((FX_LPCSTR)file_path); + FX_DWORD err_code = pParser->StartParse((const FX_CHAR*)file_path); if (err_code) { delete pParser; ProcessParseError(err_code); @@ -445,7 +445,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int // Create a device with this external buffer pContext->m_pBitmap = new CFX_DIBitmap; - pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (FX_LPBYTE)pBuffer); + pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (uint8_t*)pBuffer); pContext->m_pDevice = new CPDF_FxgeDevice; ((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap); @@ -533,7 +533,7 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page) { if (!page) return; - CPDFSDK_PageView* pPageView = (CPDFSDK_PageView*)(((CPDF_Page*)page))->GetPrivateData((FX_LPVOID)page); + CPDFSDK_PageView* pPageView = (CPDFSDK_PageView*)(((CPDF_Page*)page))->GetPrivateData((void*)page); if (pPageView && pPageView->IsLocked()) { pPageView->TakeOverPage(); return; @@ -625,7 +625,7 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for return NULL; } CFX_DIBitmap* pBitmap = new CFX_DIBitmap; - pBitmap->Create(width, height, fx_format, (FX_LPBYTE)first_scan, stride); + pBitmap->Create(width, height, fx_format, (uint8_t*)first_scan, stride); return pBitmap; } -- cgit v1.2.3