diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-27 21:24:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-27 21:24:06 +0000 |
commit | 9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9 (patch) | |
tree | 8b28edc1ce78727da78138df2cdf6ea328e99ddd /core/fxcodec/codec/ccodec_gifmodule.cpp | |
parent | 9b93815edae6687d79d73c153c30d27e280c7571 (diff) | |
download | pdfium-9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9.tar.xz |
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 <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_gifmodule.cpp')
-rw-r--r-- | core/fxcodec/codec/ccodec_gifmodule.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp index 0567af06ea..d6ab10d9c9 100644 --- a/core/fxcodec/codec/ccodec_gifmodule.cpp +++ b/core/fxcodec/codec/ccodec_gifmodule.cpp @@ -43,19 +43,17 @@ CFX_GifDecodeStatus CCodec_GifModule::ReadHeader(Context* pContext, return CFX_GifDecodeStatus::Success; } -CFX_GifDecodeStatus CCodec_GifModule::LoadFrameInfo(Context* pContext, - int* frame_num) { +std::pair<CFX_GifDecodeStatus, size_t> CCodec_GifModule::LoadFrameInfo( + Context* pContext) { auto* context = static_cast<CFX_GifContext*>(pContext); CFX_GifDecodeStatus ret = context->GetFrame(); if (ret != CFX_GifDecodeStatus::Success) - return ret; - - *frame_num = context->GetFrameNum(); - return CFX_GifDecodeStatus::Success; + return {ret, 0}; + return {CFX_GifDecodeStatus::Success, context->GetFrameNum()}; } CFX_GifDecodeStatus CCodec_GifModule::LoadFrame(Context* pContext, - int frame_num, + size_t frame_num, CFX_DIBAttribute* pAttribute) { auto* context = static_cast<CFX_GifContext*>(pContext); CFX_GifDecodeStatus ret = context->LoadFrame(frame_num); |