summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_jpegmodule.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-31 22:46:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-31 22:46:37 +0000
commita38996be8593ba78d3eb31e30d2d6f7c61990ec6 (patch)
treebe978e80632c64f2d7bb46b879092d9d7f28a003 /core/fxcodec/codec/ccodec_jpegmodule.cpp
parentca3a100e7dcf3671bd0774ec3f5233df6996dcea (diff)
downloadpdfium-chromium/3542.tar.xz
Remove avail_buf out argument from GetAvailInput() methods.chromium/3542chromium/3541chromium/3540chromium/3539
It's always passed as nullptr. It's a good thing, too, since it looks like some of the implementations are returning a wrong pointer. Add some missing |const|s. Change-Id: I768048fdfe4cdd1dc838fee26fec18e024e39920 Reviewed-on: https://pdfium-review.googlesource.com/41810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_jpegmodule.cpp')
-rw-r--r--core/fxcodec/codec/ccodec_jpegmodule.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/core/fxcodec/codec/ccodec_jpegmodule.cpp b/core/fxcodec/codec/ccodec_jpegmodule.cpp
index e6aef3c05b..aaf16ae762 100644
--- a/core/fxcodec/codec/ccodec_jpegmodule.cpp
+++ b/core/fxcodec/codec/ccodec_jpegmodule.cpp
@@ -464,15 +464,8 @@ bool CCodec_JpegModule::ReadScanline(Context* pContext,
return nlines == 1;
}
-uint32_t CCodec_JpegModule::GetAvailInput(Context* pContext,
- uint8_t** avail_buf_ptr) {
+uint32_t CCodec_JpegModule::GetAvailInput(Context* pContext) const {
auto* ctx = static_cast<CJpegContext*>(pContext);
- if (avail_buf_ptr) {
- *avail_buf_ptr = nullptr;
- if (ctx->m_SrcMgr.bytes_in_buffer > 0) {
- *avail_buf_ptr = (uint8_t*)ctx->m_SrcMgr.next_input_byte;
- }
- }
return (uint32_t)ctx->m_SrcMgr.bytes_in_buffer;
}