diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-10 20:10:05 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-10 20:10:05 +0000 |
commit | 326c38c4f2749e61fa2dec1d0f326e4099d6a24c (patch) | |
tree | b640be3187b42d9cdc8756f88f87400e25440961 /fpdfsdk/fpdfdoc.cpp | |
parent | 678b97f3fc747cc203c036c01d23fe790b230b85 (diff) | |
download | pdfium-326c38c4f2749e61fa2dec1d0f326e4099d6a24c.tar.xz |
Remove unused parameter from FPDFDest_GetView().
Fix a bunch of nits as well.
Change-Id: I874f9b1d4676823635aad8986fcf23a11ae6efd9
Reviewed-on: https://pdfium-review.googlesource.com/22473
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfdoc.cpp')
-rw-r--r-- | fpdfsdk/fpdfdoc.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp index 14e4361483..47ecf4223b 100644 --- a/fpdfsdk/fpdfdoc.cpp +++ b/fpdfsdk/fpdfdoc.cpp @@ -211,26 +211,20 @@ FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FPDF_DEST pDict) { } FPDF_EXPORT unsigned long FPDF_CALLCONV -FPDFDest_GetView(FPDF_DOCUMENT document, - FPDF_DEST pDict, - unsigned long* outNumParams, - FS_FLOAT* outParams) { +FPDFDest_GetView(FPDF_DEST pDict, + unsigned long* pNumParams, + FS_FLOAT* pParams) { if (!pDict) { - *outNumParams = 0; - return 0; - } - - CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); - if (!pDoc) { - *outNumParams = 0; + *pNumParams = 0; return 0; } CPDF_Dest dest(static_cast<CPDF_Array*>(pDict)); - - *outNumParams = dest.GetNumParams(); - for (unsigned long i = 0; i < *outNumParams; ++i) - outParams[i] = dest.GetParam(i); + unsigned long nParams = dest.GetNumParams(); + ASSERT(nParams <= 4); + *pNumParams = nParams; + for (unsigned long i = 0; i < nParams; ++i) + pParams[i] = dest.GetParam(i); return dest.GetZoomMode(); } |