Give a variable in FPDF_CountNamedDests() a better name.
Make it more obvious it is for looking up old style named destinations.
Change-Id: I75ddc4983ba3f3e680d4d5d13ef868d9c7731e21
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69754
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index 61df7a6..4ae33f6 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -1012,9 +1012,9 @@
auto name_tree = CPDF_NameTree::Create(pDoc, "Dests");
FX_SAFE_UINT32 count = name_tree ? name_tree->GetCount() : 0;
- const CPDF_Dictionary* pDest = pRoot->GetDictFor("Dests");
- if (pDest)
- count += pDest->size();
+ const CPDF_Dictionary* pOldStyleDests = pRoot->GetDictFor("Dests");
+ if (pOldStyleDests)
+ count += pOldStyleDests->size();
return count.ValueOrDefault(0);
}