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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_array.cpp

Issue 1841643002: Code change to avoid signed/unsigned mismatch warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: change comments Created 4 years, 9 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: core/fpdfapi/fpdf_parser/cpdf_array.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_array.cpp b/core/fpdfapi/fpdf_parser/cpdf_array.cpp
index 544469916beba0a6f5867e9cd7837a0622939de2..103ec7367b2d0fda53392d051d38d1090a86e718 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_array.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_array.cpp
@@ -131,14 +131,14 @@ CPDF_Array* CPDF_Array::GetArrayAt(uint32_t i) const {
return ToArray(GetElementValue(i));
}
-void CPDF_Array::RemoveAt(uint32_t i, int nCount) {
+void CPDF_Array::RemoveAt(uint32_t i, uint32_t nCount) {
if (i >= (uint32_t)m_Objects.GetSize())
return;
if (nCount <= 0 || nCount > m_Objects.GetSize() - i)
return;
- for (int j = 0; j < nCount; ++j) {
+ for (uint32_t j = 0; j < nCount; ++j) {
if (CPDF_Object* p = m_Objects.GetAt(i + j))
p->Release();
}

Powered by Google App Engine
This is Rietveld 408576698