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

Side by Side Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 429593005: Fix a few more warnings in chromium_code mode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 4 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 "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fpdfapi/fpdf_pageobj.h" 9 #include "../../../include/fpdfapi/fpdf_pageobj.h"
10 #include "font_int.h" 10 #include "font_int.h"
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 LoadGlyphMap(); 988 LoadGlyphMap();
989 if (m_pCharNames) { 989 if (m_pCharNames) {
990 FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256); 990 FX_DELETE_VECTOR(m_pCharNames, CFX_ByteString, 256);
991 m_pCharNames = NULL; 991 m_pCharNames = NULL;
992 } 992 }
993 if (m_Font.m_Face == NULL) { 993 if (m_Font.m_Face == NULL) {
994 return TRUE; 994 return TRUE;
995 } 995 }
996 if (m_Flags & PDFFONT_ALLCAP) { 996 if (m_Flags & PDFFONT_ALLCAP) {
997 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd}; 997 unsigned char lowercases[] = {'a', 'z', 0xe0, 0xf6, 0xf8, 0xfd};
998 for (int range = 0; range < sizeof lowercases / 2; range ++) { 998 for (size_t range = 0; range < sizeof lowercases / 2; range ++) {
999 for (int i = lowercases[range * 2]; i <= lowercases[range * 2 + 1]; i ++) { 999 for (int i = lowercases[range * 2]; i <= lowercases[range * 2 + 1]; i ++) {
1000 if (m_GlyphIndex[i] != 0xffff && m_pFontFile != NULL) { 1000 if (m_GlyphIndex[i] != 0xffff && m_pFontFile != NULL) {
1001 continue; 1001 continue;
1002 } 1002 }
1003 m_GlyphIndex[i] = m_GlyphIndex[i - 32]; 1003 m_GlyphIndex[i] = m_GlyphIndex[i - 32];
1004 if (m_CharWidth[i - 32]) { 1004 if (m_CharWidth[i - 32]) {
1005 m_CharWidth[i] = m_CharWidth[i - 32]; 1005 m_CharWidth[i] = m_CharWidth[i - 32];
1006 m_CharBBox[i] = m_CharBBox[i - 32]; 1006 m_CharBBox[i] = m_CharBBox[i - 32];
1007 } 1007 }
1008 } 1008 }
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 } 1761 }
1762 CPDF_Type3Char::~CPDF_Type3Char() 1762 CPDF_Type3Char::~CPDF_Type3Char()
1763 { 1763 {
1764 if (m_pForm) { 1764 if (m_pForm) {
1765 delete m_pForm; 1765 delete m_pForm;
1766 } 1766 }
1767 if (m_pBitmap) { 1767 if (m_pBitmap) {
1768 delete m_pBitmap; 1768 delete m_pBitmap;
1769 } 1769 }
1770 } 1770 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font_utility.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698