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

Unified Diff: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
diff --git a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
index cde28fd53485a37b6212b6ce663e9f0af8904de3..194db8b25cf2dad8f6c53d9ff7b160d2398085c2 100644
--- a/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_cidfont.cpp
@@ -682,17 +682,17 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, FX_BOOL* pVertGlyph) {
if (!name) {
return charcode == 0 ? -1 : (int)charcode;
}
- uint16_t unicode = PDF_UnicodeFromAdobeName(name);
- if (unicode) {
+ uint16_t name_unicode = PDF_UnicodeFromAdobeName(name);
+ if (name_unicode) {
if (bMSUnicode) {
- index = FXFT_Get_Char_Index(face, unicode);
+ index = FXFT_Get_Char_Index(face, name_unicode);
} else if (bMacRoman) {
uint32_t maccode =
- FT_CharCodeFromUnicode(FXFT_ENCODING_APPLE_ROMAN, unicode);
+ FT_CharCodeFromUnicode(FXFT_ENCODING_APPLE_ROMAN, name_unicode);
index = !maccode ? FXFT_Get_Name_Index(face, (char*)name)
: FXFT_Get_Char_Index(face, maccode);
} else {
- return FXFT_Get_Char_Index(face, unicode);
+ return FXFT_Get_Char_Index(face, name_unicode);
}
} else {
return charcode == 0 ? -1 : (int)charcode;
@@ -815,16 +815,15 @@ void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray,
if (!pObj)
continue;
- if (CPDF_Array* pArray = pObj->AsArray()) {
+ if (CPDF_Array* pObjArray = pObj->AsArray()) {
if (width_status != 1)
return;
- for (size_t j = 0; j < pArray->GetCount(); j += nElements) {
+ for (size_t j = 0; j < pObjArray->GetCount(); j += nElements) {
result.Add(first_code);
result.Add(first_code);
- for (int k = 0; k < nElements; k++) {
- result.Add(pArray->GetIntegerAt(j + k));
- }
+ for (int k = 0; k < nElements; k++)
+ result.Add(pObjArray->GetIntegerAt(j + k));
first_code++;
}
width_status = 0;
« no previous file with comments | « core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698