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

Side by Side Diff: core/src/fxge/ge/fx_ge_text.cpp

Issue 1098583002: Fix a bunch of -Wunused-but-set-variable warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../../../include/fxge/fx_freetype.h" 8 #include "../../../include/fxge/fx_freetype.h"
9 #include "../../../include/fxcodec/fx_codec.h" 9 #include "../../../include/fxcodec/fx_codec.h"
10 #include "text_int.h" 10 #include "text_int.h"
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 coords[0] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 0)) / 65536; 1182 coords[0] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 0)) / 65536;
1183 } else { 1183 } else {
1184 coords[0] = weight; 1184 coords[0] = weight;
1185 } 1185 }
1186 if (dest_width == 0) { 1186 if (dest_width == 0) {
1187 coords[1] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 1)) / 65536; 1187 coords[1] = FXFT_Get_MM_Axis_Def(FXFT_Get_MM_Axis(pMasters, 1)) / 65536;
1188 } else { 1188 } else {
1189 int min_param = FXFT_Get_MM_Axis_Min(FXFT_Get_MM_Axis(pMasters, 1)) / 65 536; 1189 int min_param = FXFT_Get_MM_Axis_Min(FXFT_Get_MM_Axis(pMasters, 1)) / 65 536;
1190 int max_param = FXFT_Get_MM_Axis_Max(FXFT_Get_MM_Axis(pMasters, 1)) / 65 536; 1190 int max_param = FXFT_Get_MM_Axis_Max(FXFT_Get_MM_Axis(pMasters, 1)) / 65 536;
1191 coords[1] = min_param; 1191 coords[1] = min_param;
1192 int error = FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords); 1192 FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords);
Lei Zhang 2015/04/17 00:34:10 Maybe we should check here?
Tom Sepez 2015/04/17 16:20:17 Maybe at least: (void) FXFT_Set_MM_Design_Coo
Lei Zhang 2015/05/08 05:40:38 I'll try to fix this separately later.
1193 error = FXFT_Load_Glyph(m_Face, glyph_index, FXFT_LOAD_NO_SCALE | FXFT_L OAD_IGNORE_GLOBAL_ADVANCE_WIDTH); 1193 FXFT_Load_Glyph(m_Face, glyph_index, FXFT_LOAD_NO_SCALE | FXFT_LOAD_IGNO RE_GLOBAL_ADVANCE_WIDTH);
1194 int min_width = FXFT_Get_Glyph_HoriAdvance(m_Face) * 1000 / FXFT_Get_Fac e_UnitsPerEM(m_Face); 1194 int min_width = FXFT_Get_Glyph_HoriAdvance(m_Face) * 1000 / FXFT_Get_Fac e_UnitsPerEM(m_Face);
1195 coords[1] = max_param; 1195 coords[1] = max_param;
1196 error = FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords); 1196 FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords);
1197 error = FXFT_Load_Glyph(m_Face, glyph_index, FXFT_LOAD_NO_SCALE | FXFT_L OAD_IGNORE_GLOBAL_ADVANCE_WIDTH); 1197 FXFT_Load_Glyph(m_Face, glyph_index, FXFT_LOAD_NO_SCALE | FXFT_LOAD_IGNO RE_GLOBAL_ADVANCE_WIDTH);
1198 int max_width = FXFT_Get_Glyph_HoriAdvance(m_Face) * 1000 / FXFT_Get_Fac e_UnitsPerEM(m_Face); 1198 int max_width = FXFT_Get_Glyph_HoriAdvance(m_Face) * 1000 / FXFT_Get_Fac e_UnitsPerEM(m_Face);
1199 if (max_width == min_width) { 1199 if (max_width == min_width) {
1200 return; 1200 return;
1201 } 1201 }
1202 int param = min_param + (max_param - min_param) * (dest_width - min_widt h) / (max_width - min_width); 1202 int param = min_param + (max_param - min_param) * (dest_width - min_widt h) / (max_width - min_width);
1203 coords[1] = param; 1203 coords[1] = param;
1204 } 1204 }
1205 FXFT_Free(m_Face, pMasters); 1205 FXFT_Free(m_Face, pMasters);
1206 FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords); 1206 FXFT_Set_MM_Design_Coordinates(m_Face, 2, coords);
1207 } 1207 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 { 1675 {
1676 va_list argList; 1676 va_list argList;
1677 va_start(argList, count); 1677 va_start(argList, count);
1678 for (int i = 0; i < count; i ++) { 1678 for (int i = 0; i < count; i ++) {
1679 int p = va_arg(argList, int); 1679 int p = va_arg(argList, int);
1680 ((FX_DWORD*)m_Key)[i] = p; 1680 ((FX_DWORD*)m_Key)[i] = p;
1681 } 1681 }
1682 va_end(argList); 1682 va_end(argList);
1683 m_KeyLen = count * sizeof(FX_DWORD); 1683 m_KeyLen = count * sizeof(FX_DWORD);
1684 } 1684 }
OLDNEW
« core/src/fxge/ge/fx_ge_fontmap.cpp ('K') | « core/src/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698