Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1411203007: Cleanup parts of CPDFSDK_AnnotIterator and CPDFSDK_PageView. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/fsdk_baseform.cpp
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 542ade022a372906fa05a78058ce4b9c362d2582..619668e7d7f851ebf0f258c0d792ee663c74628e 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -2461,7 +2461,7 @@ void CBA_AnnotIterator::GenerateResults() {
switch (m_nTabs) {
case BAI_STRUCTURE: {
- for (int i = 0, sz = m_pPageView->CountAnnots(); i < sz; i++) {
+ for (size_t i = 0; i < m_pPageView->CountAnnots(); ++i) {
CPDFSDK_Annot* pAnnot = m_pPageView->GetAnnot(i);
ASSERT(pAnnot != NULL);
@@ -2473,7 +2473,7 @@ void CBA_AnnotIterator::GenerateResults() {
CPDFSDK_SortAnnots sa;
{
- for (int i = 0, sz = m_pPageView->CountAnnots(); i < sz; i++) {
+ for (size_t i = 0; i < m_pPageView->CountAnnots(); ++i) {
CPDFSDK_Annot* pAnnot = m_pPageView->GetAnnot(i);
ASSERT(pAnnot != NULL);
@@ -2552,7 +2552,7 @@ void CBA_AnnotIterator::GenerateResults() {
CPDFSDK_SortAnnots sa;
{
- for (int i = 0, sz = m_pPageView->CountAnnots(); i < sz; i++) {
+ for (size_t i = 0; i < m_pPageView->CountAnnots(); ++i) {
CPDFSDK_Annot* pAnnot = m_pPageView->GetAnnot(i);
ASSERT(pAnnot != NULL);

Powered by Google App Engine
This is Rietveld 408576698