summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-03 17:27:11 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-04 13:12:18 +0000
commite115b2e6a892e0af3b011475c0deed093284e7b4 (patch)
tree97b9a48fc579803368f1f963b9b7d4553515bac6 /core/fxcodec/codec
parentbb4a1bc09f92f781deefae5dc187fef21d6957fd (diff)
downloadpdfium-e115b2e6a892e0af3b011475c0deed093284e7b4.tar.xz
Remove unneeded void* casts.
Change-Id: Icf6b0ec88dfc8dc707b18ca4ad25dd77610b4c91 Reviewed-on: https://pdfium-review.googlesource.com/3622 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/ccodec_bmpmodule.cpp4
-rw-r--r--core/fxcodec/codec/ccodec_gifmodule.cpp4
-rw-r--r--core/fxcodec/codec/ccodec_pngmodule.cpp2
-rw-r--r--core/fxcodec/codec/ccodec_tiffmodule.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_icc.cpp8
5 files changed, 9 insertions, 11 deletions
diff --git a/core/fxcodec/codec/ccodec_bmpmodule.cpp b/core/fxcodec/codec/ccodec_bmpmodule.cpp
index 660e89c4a0..003f5d3d49 100644
--- a/core/fxcodec/codec/ccodec_bmpmodule.cpp
+++ b/core/fxcodec/codec/ccodec_bmpmodule.cpp
@@ -63,13 +63,13 @@ FXBMP_Context* CCodec_BmpModule::Start() {
p->m_AllocFunc = bmp_alloc_func;
p->m_FreeFunc = bmp_free_func;
p->bmp_ptr = nullptr;
- p->parent_ptr = (void*)this;
+ p->parent_ptr = this;
p->bmp_ptr = bmp_create_decompress();
if (!p->bmp_ptr) {
FX_Free(p);
return nullptr;
}
- p->bmp_ptr->context_ptr = (void*)p;
+ p->bmp_ptr->context_ptr = p;
p->bmp_ptr->err_ptr = m_szLastError;
p->bmp_ptr->bmp_error_fn = bmp_error_data;
p->bmp_ptr->bmp_get_row_fn = bmp_read_scanline;
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp
index caa21e1424..ca9fd07ba6 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.cpp
+++ b/core/fxcodec/codec/ccodec_gifmodule.cpp
@@ -92,13 +92,13 @@ FXGIF_Context* CCodec_GifModule::Start() {
p->m_AllocFunc = gif_alloc_func;
p->m_FreeFunc = gif_free_func;
p->gif_ptr = nullptr;
- p->parent_ptr = (void*)this;
+ p->parent_ptr = this;
p->gif_ptr = gif_create_decompress();
if (!p->gif_ptr) {
FX_Free(p);
return nullptr;
}
- p->gif_ptr->context_ptr = (void*)p;
+ p->gif_ptr->context_ptr = p;
p->gif_ptr->err_ptr = m_szLastError;
p->gif_ptr->gif_error_fn = gif_error_data;
p->gif_ptr->gif_ask_buf_for_pal_fn = gif_ask_buf_for_pal;
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp
index ae34b53413..09bc1ac7e7 100644
--- a/core/fxcodec/codec/ccodec_pngmodule.cpp
+++ b/core/fxcodec/codec/ccodec_pngmodule.cpp
@@ -211,7 +211,7 @@ FXPNG_Context* CCodec_PngModule::Start() {
p->m_FreeFunc = _png_free_func;
p->png_ptr = nullptr;
p->info_ptr = nullptr;
- p->parent_ptr = (void*)this;
+ p->parent_ptr = this;
p->png_ptr =
png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
if (!p->png_ptr) {
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp
index cc51677abd..e4ef355f38 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -186,7 +186,7 @@ bool Tiff_Exif_GetInfo(TIFF* tif_ctx, ttag_t tag, CFX_DIBAttribute* pAttr) {
return false;
T* ptr = FX_Alloc(T, 1);
*ptr = val;
- pAttr->m_Exif[tag] = (void*)ptr;
+ pAttr->m_Exif[tag] = ptr;
return true;
}
diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp
index b143dcc0c9..315f48417c 100644
--- a/core/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/fxcodec/codec/fx_codec_icc.cpp
@@ -62,7 +62,7 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData,
uint32_t dwDstFormat = Icc_FORMAT_DEFAULT) {
nSrcComponents = 0;
cmsHPROFILE srcProfile =
- cmsOpenProfileFromMem((void*)pSrcProfileData, dwSrcProfileSize);
+ cmsOpenProfileFromMem(pSrcProfileData, dwSrcProfileSize);
if (!srcProfile)
return nullptr;
@@ -70,8 +70,7 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData,
if (!pDstProfileData && dwDstProfileSize == 0 && nDstComponents == 3) {
dstProfile = cmsCreate_sRGBProfile();
} else {
- dstProfile =
- cmsOpenProfileFromMem((void*)pDstProfileData, dwDstProfileSize);
+ dstProfile = cmsOpenProfileFromMem(pDstProfileData, dwDstProfileSize);
}
if (!dstProfile) {
cmsCloseProfile(srcProfile);
@@ -205,8 +204,7 @@ void IccLib_TranslateImage(void* pTransform,
unsigned char* pDest,
const unsigned char* pSrc,
int32_t pixels) {
- cmsDoTransform(((CLcmsCmm*)pTransform)->m_hTransform, (void*)pSrc, pDest,
- pixels);
+ cmsDoTransform(((CLcmsCmm*)pTransform)->m_hTransform, pSrc, pDest, pixels);
}
CCodec_IccModule::CCodec_IccModule() : m_nComponents(0) {}