From 9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 27 Nov 2017 21:24:06 +0000 Subject: Convert CFX_GifContext::GetFrameNum to size_t This CL removes the CollectionSize and updates call locations as needed. Bug: pdfium:774 Change-Id: I813c500b3a17a194407ceb1304252b9b16fe1779 Reviewed-on: https://pdfium-review.googlesource.com/19590 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- core/fxcodec/gif/cfx_gifcontext.cpp | 4 ---- core/fxcodec/gif/cfx_gifcontext.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'core/fxcodec/gif') diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp index fba7334c93..6159e56c13 100644 --- a/core/fxcodec/gif/cfx_gifcontext.cpp +++ b/core/fxcodec/gif/cfx_gifcontext.cpp @@ -348,10 +348,6 @@ uint32_t CFX_GifContext::GetAvailInput(uint8_t** avail_buf) const { return avail_in_; } -int32_t CFX_GifContext::GetFrameNum() const { - return pdfium::CollectionSize(images_); -} - uint8_t* CFX_GifContext::ReadData(uint8_t** des_buf_pp, uint32_t data_size) { if (!next_in_) return nullptr; diff --git a/core/fxcodec/gif/cfx_gifcontext.h b/core/fxcodec/gif/cfx_gifcontext.h index e0c5900f93..3a367bd361 100644 --- a/core/fxcodec/gif/cfx_gifcontext.h +++ b/core/fxcodec/gif/cfx_gifcontext.h @@ -41,7 +41,7 @@ class CFX_GifContext : public CCodec_GifModule::Context { CFX_GifDecodeStatus LoadFrame(int32_t frame_num); void SetInputBuffer(uint8_t* src_buf, uint32_t src_size); uint32_t GetAvailInput(uint8_t** avail_buf) const; - int32_t GetFrameNum() const; + size_t GetFrameNum() const { return images_.size(); } UnownedPtr gif_module_; UnownedPtr delegate_; -- cgit v1.2.3