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

Side by Side Diff: core/fxge/ge/fx_ge_fontmap.cpp

Issue 1840483003: Reduce signed/unsigned comparison 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
« no previous file with comments | « core/fxge/ge/fx_ge_font.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1322
1323 void* IFX_SystemFontInfo::RetainFont(void* hFont) { 1323 void* IFX_SystemFontInfo::RetainFont(void* hFont) {
1324 return NULL; 1324 return NULL;
1325 } 1325 }
1326 1326
1327 int CFX_FontMapper::GetFaceSize() const { 1327 int CFX_FontMapper::GetFaceSize() const {
1328 return pdfium::CollectionSize<int>(m_FaceArray); 1328 return pdfium::CollectionSize<int>(m_FaceArray);
1329 } 1329 }
1330 1330
1331 FX_BOOL CFX_FontMapper::IsBuiltinFace(const FXFT_Face face) const { 1331 FX_BOOL CFX_FontMapper::IsBuiltinFace(const FXFT_Face face) const {
1332 for (int i = 0; i < MM_FACE_COUNT; ++i) { 1332 for (size_t i = 0; i < MM_FACE_COUNT; ++i) {
1333 if (m_MMFaces[i] == face) { 1333 if (m_MMFaces[i] == face) {
1334 return TRUE; 1334 return TRUE;
1335 } 1335 }
1336 } 1336 }
1337 for (int i = 0; i < FOXIT_FACE_COUNT; ++i) { 1337 for (size_t i = 0; i < FOXIT_FACE_COUNT; ++i) {
1338 if (m_FoxitFaces[i] == face) { 1338 if (m_FoxitFaces[i] == face) {
1339 return TRUE; 1339 return TRUE;
1340 } 1340 }
1341 } 1341 }
1342 return FALSE; 1342 return FALSE;
1343 } 1343 }
1344 1344
1345 extern "C" { 1345 extern "C" {
1346 unsigned long _FTStreamRead(FXFT_Stream stream, 1346 unsigned long _FTStreamRead(FXFT_Stream stream,
1347 unsigned long offset, 1347 unsigned long offset,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 int PDF_GetStandardFontName(CFX_ByteString* name) { 1642 int PDF_GetStandardFontName(CFX_ByteString* name) {
1643 AltFontName* found = static_cast<AltFontName*>( 1643 AltFontName* found = static_cast<AltFontName*>(
1644 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), 1644 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames),
1645 sizeof(AltFontName), CompareString)); 1645 sizeof(AltFontName), CompareString));
1646 if (!found) 1646 if (!found)
1647 return -1; 1647 return -1;
1648 1648
1649 *name = g_Base14FontNames[found->m_Index]; 1649 *name = g_Base14FontNames[found->m_Index];
1650 return found->m_Index; 1650 return found->m_Index;
1651 } 1651 }
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_font.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698