diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-21 22:07:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-21 22:07:50 +0000 |
commit | 56e04d2656bdd5f2b9448d857e8e73ab16aadf8e (patch) | |
tree | 57ed8ebed62f498bdd1fe010b0909f162bbcd29c /core/fxcodec/codec/ccodec_pngmodule.cpp | |
parent | ebe865db548f768038186054fc0f1eb024565c43 (diff) | |
download | pdfium-56e04d2656bdd5f2b9448d857e8e73ab16aadf8e.tar.xz |
Avoid passing pointers by reference in core.
This gets rid of most core/ non-const ref passing, either by passing by
pointer-to-pointer instead, or by returning std::pair.
Change-Id: Id7bdc355a1a725a05f9fa2f1e982ca8c975beef1
Reviewed-on: https://pdfium-review.googlesource.com/19030
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_pngmodule.cpp')
-rw-r--r-- | core/fxcodec/codec/ccodec_pngmodule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcodec/codec/ccodec_pngmodule.cpp b/core/fxcodec/codec/ccodec_pngmodule.cpp index 0531ff10b1..40bdfba7ce 100644 --- a/core/fxcodec/codec/ccodec_pngmodule.cpp +++ b/core/fxcodec/codec/ccodec_pngmodule.cpp @@ -183,8 +183,8 @@ static void _png_get_row_func(png_structp png_ptr, if (!pContext) return; - uint8_t* src_buf = nullptr; - if (!pContext->m_pDelegate->PngAskScanlineBuf(row_num, src_buf)) + uint8_t* src_buf; + if (!pContext->m_pDelegate->PngAskScanlineBuf(row_num, &src_buf)) png_error(png_ptr, "Ask Scanline buffer Callback Error"); if (src_buf) |