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

Unified Diff: core/fxcodec/codec/fx_codec_jpeg.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 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 | « core/fxcodec/codec/fx_codec_jbig.cpp ('k') | core/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/fx_codec_jpeg.cpp
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index cbfea59329075ffd4e45e0217909e7cca0def771..c2814a4b4cf7debb9f4b616fa9c220754f66383d 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -78,11 +78,10 @@ static void _error_do_nothing2(j_common_ptr cinfo, char*) {}
#define JPEG_MARKER_ICC (JPEG_APP0 + 2)
#define JPEG_MARKER_MAXSIZE 0xFFFF
-
#ifdef PDF_ENABLE_XFA
static void JpegLoadAttribute(struct jpeg_decompress_struct* pInfo,
CFX_DIBAttribute* pAttribute) {
- if (!pInfo || !pAttribute)
+ if (!pAttribute)
return;
pAttribute->m_nXDPI = pInfo->X_density;
@@ -178,7 +177,7 @@ class CCodec_JpegDecoder : public CCodec_ScanlineDecoder {
};
CCodec_JpegDecoder::CCodec_JpegDecoder() {
- m_pScanlineBuf = NULL;
+ m_pScanlineBuf = nullptr;
m_bStarted = FALSE;
m_bInited = FALSE;
FXSYS_memset(&cinfo, 0, sizeof(cinfo));
@@ -470,7 +469,7 @@ FX_BOOL CCodec_JpegModule::ReadScanline(FXJPEG_Context* ctx,
uint32_t CCodec_JpegModule::GetAvailInput(FXJPEG_Context* ctx,
uint8_t** avail_buf_ptr) {
if (avail_buf_ptr) {
- *avail_buf_ptr = NULL;
+ *avail_buf_ptr = nullptr;
if (ctx->m_SrcMgr.bytes_in_buffer > 0) {
*avail_buf_ptr = (uint8_t*)ctx->m_SrcMgr.next_input_byte;
}
« no previous file with comments | « core/fxcodec/codec/fx_codec_jbig.cpp ('k') | core/fxcodec/codec/fx_codec_jpx_opj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698