summaryrefslogtreecommitdiff
path: root/core/fxcodec/gif/cfx_gifcontext.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/gif/cfx_gifcontext.cpp
parentca3a100e7dcf3671bd0774ec3f5233df6996dcea (diff)
downloadpdfium-a38996be8593ba78d3eb31e30d2d6f7c61990ec6.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/gif/cfx_gifcontext.cpp')
-rw-r--r--core/fxcodec/gif/cfx_gifcontext.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp
index f746bc13c5..8f48cfde48 100644
--- a/core/fxcodec/gif/cfx_gifcontext.cpp
+++ b/core/fxcodec/gif/cfx_gifcontext.cpp
@@ -346,19 +346,11 @@ void CFX_GifContext::SetInputBuffer(pdfium::span<uint8_t> src_buf) {
input_buffer_ = pdfium::MakeRetain<CFX_CodecMemory>(src_buf);
}
-uint32_t CFX_GifContext::GetAvailInput(uint8_t** avail_buf) const {
+uint32_t CFX_GifContext::GetAvailInput() const {
if (!input_buffer_)
return 0;
- FX_FILESIZE available_size =
- input_buffer_->GetSize() - input_buffer_->GetPosition();
- if (avail_buf) {
- *avail_buf = nullptr;
- if (available_size > 0)
- *avail_buf = input_buffer_->GetBuffer() + available_size;
- }
-
- return available_size;
+ return input_buffer_->GetSize() - input_buffer_->GetPosition();
}
bool CFX_GifContext::ReadData(uint8_t* dest, uint32_t size) {