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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 } 1119 }
1120 1120
1121 void CPDF_StreamContentParser::Handle_SetColorPS_Fill() { 1121 void CPDF_StreamContentParser::Handle_SetColorPS_Fill() {
1122 if (m_Options.m_bTextOnly) { 1122 if (m_Options.m_bTextOnly) {
1123 return; 1123 return;
1124 } 1124 }
1125 CPDF_Object* pLastParam = GetObject(0); 1125 CPDF_Object* pLastParam = GetObject(0);
1126 if (!pLastParam) { 1126 if (!pLastParam) {
1127 return; 1127 return;
1128 } 1128 }
1129 int nargs = m_ParamCount; 1129 uint32_t nargs = m_ParamCount;
1130 int nvalues = nargs; 1130 uint32_t nvalues = nargs;
1131 if (pLastParam->IsName()) { 1131 if (pLastParam->IsName())
1132 nvalues--; 1132 nvalues--;
1133 }
1134 FX_FLOAT* values = NULL; 1133 FX_FLOAT* values = NULL;
1135 if (nvalues) { 1134 if (nvalues) {
1136 values = FX_Alloc(FX_FLOAT, nvalues); 1135 values = FX_Alloc(FX_FLOAT, nvalues);
1137 for (int i = 0; i < nvalues; i++) { 1136 for (uint32_t i = 0; i < nvalues; i++) {
1138 values[i] = GetNumber(nargs - i - 1); 1137 values[i] = GetNumber(nargs - i - 1);
1139 } 1138 }
1140 } 1139 }
1141 if (nvalues != nargs) { 1140 if (nvalues != nargs) {
1142 CPDF_Pattern* pPattern = FindPattern(GetString(0), FALSE); 1141 CPDF_Pattern* pPattern = FindPattern(GetString(0), FALSE);
1143 if (pPattern) { 1142 if (pPattern) {
1144 m_pCurStates->m_ColorState.SetFillPattern(pPattern, values, nvalues); 1143 m_pCurStates->m_ColorState.SetFillPattern(pPattern, values, nvalues);
1145 } 1144 }
1146 } else { 1145 } else {
1147 m_pCurStates->m_ColorState.SetFillColor(NULL, values, nvalues); 1146 m_pCurStates->m_ColorState.SetFillColor(NULL, values, nvalues);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 } else { 1821 } else {
1823 PDF_ReplaceAbbr(pElement); 1822 PDF_ReplaceAbbr(pElement);
1824 } 1823 }
1825 } 1824 }
1826 break; 1825 break;
1827 } 1826 }
1828 default: 1827 default:
1829 break; 1828 break;
1830 } 1829 }
1831 } 1830 }
OLDNEW
« 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