summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec_jpeg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec/fx_codec_jpeg.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp6
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;
}