diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-27 10:53:11 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-27 16:11:38 +0000 |
commit | 875e98c581952478f3a3ccef9b2f2e3ed06c5346 (patch) | |
tree | 8e0d7e032056bf4c73d6da43c0f3ce4eadb74dfd /core/fxcodec/codec/fx_codec_jpeg.cpp | |
parent | cc3a3ee3ebcc1baabdfa7ffca5876dbbfa3980c1 (diff) | |
download | pdfium-875e98c581952478f3a3ccef9b2f2e3ed06c5346.tar.xz |
Remove FX_STRSIZE and replace with size_t
BUG=pdfium:828
Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16
Reviewed-on: https://pdfium-review.googlesource.com/13230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/fx_codec_jpeg.cpp')
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpeg.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index b77fc87394..b1dffbb210 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -369,7 +369,7 @@ static void _error_fatal1(j_common_ptr cinfo) { } static void _src_skip_data1(struct jpeg_decompress_struct* cinfo, long num) { - if (cinfo->src->bytes_in_buffer < (size_t)num) { + if (cinfo->src->bytes_in_buffer < static_cast<size_t>(num)) { auto* pContext = reinterpret_cast<CJpegContext*>(cinfo->client_data); pContext->m_SkipSize = (unsigned int)(num - cinfo->src->bytes_in_buffer); cinfo->src->bytes_in_buffer = 0; @@ -510,7 +510,7 @@ uint32_t CCodec_JpegModule::GetAvailInput(Context* pContext, #define JPEG_BLOCK_SIZE 1048576 bool CCodec_JpegModule::JpegEncode(const RetainPtr<CFX_DIBSource>& pSource, uint8_t** dest_buf, - FX_STRSIZE* dest_size) { + size_t* dest_size) { struct jpeg_error_mgr jerr; jerr.error_exit = _error_do_nothing; jerr.emit_message = _error_do_nothing1; @@ -603,7 +603,7 @@ bool CCodec_JpegModule::JpegEncode(const RetainPtr<CFX_DIBSource>& pSource, jpeg_finish_compress(&cinfo); jpeg_destroy_compress(&cinfo); FX_Free(line_buf); - *dest_size = dest_buf_length - (FX_STRSIZE)dest.free_in_buffer; + *dest_size = dest_buf_length - static_cast<size_t>(dest.free_in_buffer); return true; } |