From 8940993efffaaf432320509555dc61122b8b72b2 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Mon, 28 Mar 2016 10:33:33 -0700 Subject: Reduce signed/unsigned comparison warnings The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 . --- fpdfsdk/fsdk_baseform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/fsdk_baseform.cpp') diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp index 5dd27f845f..1e124623f7 100644 --- a/fpdfsdk/fsdk_baseform.cpp +++ b/fpdfsdk/fsdk_baseform.cpp @@ -2800,13 +2800,13 @@ void CBA_AnnotIterator::GenerateResults() { sa.erase(sa.begin() + nLeftTopIndex); std::vector aSelect; - for (int i = 0; i < sa.size(); ++i) { + for (size_t i = 0; i < sa.size(); ++i) { CFX_FloatRect rcAnnot = GetAnnotRect(sa[i]); FX_FLOAT fCenterY = (rcAnnot.top + rcAnnot.bottom) / 2.0f; if (fCenterY > rcLeftTop.bottom && fCenterY < rcLeftTop.top) aSelect.push_back(i); } - for (int i = 0; i < aSelect.size(); ++i) + for (size_t i = 0; i < aSelect.size(); ++i) m_Annots.push_back(sa[aSelect[i]]); for (int i = aSelect.size() - 1; i >= 0; --i) @@ -2844,13 +2844,13 @@ void CBA_AnnotIterator::GenerateResults() { sa.erase(sa.begin() + nLeftTopIndex); std::vector aSelect; - for (int i = 0; i < sa.size(); ++i) { + for (size_t i = 0; i < sa.size(); ++i) { CFX_FloatRect rcAnnot = GetAnnotRect(sa[i]); FX_FLOAT fCenterX = (rcAnnot.left + rcAnnot.right) / 2.0f; if (fCenterX > rcLeftTop.left && fCenterX < rcLeftTop.right) aSelect.push_back(i); } - for (int i = 0; i < aSelect.size(); ++i) + for (size_t i = 0; i < aSelect.size(); ++i) m_Annots.push_back(sa[aSelect[i]]); for (int i = aSelect.size() - 1; i >= 0; --i) -- cgit v1.2.3