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

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1841643002: Code change to avoid signed/unsigned mismatch warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase 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
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_func.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 32517d6b54698865d711ea3e7e30ff6687ba9410..bf691f41d2f2053404d6ef5d4e0f90f88c37c3c3 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1126,15 +1126,14 @@ void CPDF_StreamContentParser::Handle_SetColorPS_Fill() {
if (!pLastParam) {
return;
}
- int nargs = m_ParamCount;
- int nvalues = nargs;
- if (pLastParam->IsName()) {
+ uint32_t nargs = m_ParamCount;
+ uint32_t nvalues = nargs;
+ if (pLastParam->IsName())
nvalues--;
- }
FX_FLOAT* values = NULL;
if (nvalues) {
values = FX_Alloc(FX_FLOAT, nvalues);
- for (int i = 0; i < nvalues; i++) {
+ for (uint32_t i = 0; i < nvalues; i++) {
values[i] = GetNumber(nargs - i - 1);
}
}
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_func.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698