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

Side by Side Diff: fpdfsdk/pdfwindow/PWL_FontMap.cpp

Issue 1840483003: Reduce signed/unsigned comparison warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 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 "fpdfsdk/pdfwindow/PWL_FontMap.h" 7 #include "fpdfsdk/pdfwindow/PWL_FontMap.h"
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" 10 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 m_aNativeFont.RemoveAll(); 171 m_aNativeFont.RemoveAll();
172 } 172 }
173 } 173 }
174 174
175 void CPWL_FontMap::Initialize() { 175 void CPWL_FontMap::Initialize() {
176 GetFontIndex(kDefaultFontName, ANSI_CHARSET, FALSE); 176 GetFontIndex(kDefaultFontName, ANSI_CHARSET, FALSE);
177 } 177 }
178 178
179 FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName) { 179 FX_BOOL CPWL_FontMap::IsStandardFont(const CFX_ByteString& sFontName) {
180 for (int32_t i = 0; i < FX_ArraySize(g_sDEStandardFontName); ++i) { 180 for (size_t i = 0; i < FX_ArraySize(g_sDEStandardFontName); ++i) {
Tom Sepez 2016/03/25 22:31:41 good. this one is a size_t for sure.
Wei Li 2016/03/26 01:04:10 Acknowledged.
181 if (sFontName == g_sDEStandardFontName[i]) 181 if (sFontName == g_sDEStandardFontName[i])
182 return TRUE; 182 return TRUE;
183 } 183 }
184 184
185 return FALSE; 185 return FALSE;
186 } 186 }
187 187
188 int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName, 188 int32_t CPWL_FontMap::FindFont(const CFX_ByteString& sFontName,
189 int32_t nCharset) { 189 int32_t nCharset) {
190 for (int32_t i = 0, sz = m_aData.GetSize(); i < sz; i++) { 190 for (int32_t i = 0, sz = m_aData.GetSize(); i < sz; i++) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 CPWL_DocFontMap::CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler, 493 CPWL_DocFontMap::CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler,
494 CPDF_Document* pAttachedDoc) 494 CPDF_Document* pAttachedDoc)
495 : CPWL_FontMap(pSystemHandler), m_pAttachedDoc(pAttachedDoc) {} 495 : CPWL_FontMap(pSystemHandler), m_pAttachedDoc(pAttachedDoc) {}
496 496
497 CPWL_DocFontMap::~CPWL_DocFontMap() {} 497 CPWL_DocFontMap::~CPWL_DocFontMap() {}
498 498
499 CPDF_Document* CPWL_DocFontMap::GetDocument() { 499 CPDF_Document* CPWL_DocFontMap::GetDocument() {
500 return m_pAttachedDoc; 500 return m_pAttachedDoc;
501 } 501 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698