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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1773733002: Review and cleanup lint 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 8b1571a4962547831a8f2b2fef7ecdd513328dbc..df9c13714d6f4889ce829f62f02e5520fb14cacb 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -771,10 +771,12 @@ CPDF_Font* CPDF_Document::AddMacFont(CTFontRef pFont,
pFontDesc->SetAtInteger("CapHeight", capheight);
CGFloat fStemV = 0;
int16_t min_width = SHRT_MAX;
+
static const UniChar stem_chars[] = {'i', 'I', '!', '1'};
- const size_t count = sizeof(stem_chars) / sizeof(stem_chars[0]);
- CGGlyph glyphs[count];
- CGRect boundingRects[count];
+ CGGlyph glyphs[FX_ArraySize(stem_chars)];
+ CGRect boundingRects[FX_ArraySize(stem_chars)];
+
+ const size_t count = FX_ArraySize(stem_chars);
if (CTFontGetGlyphsForCharacters(font, stem_chars, glyphs, count)) {
CTFontGetBoundingRectsForGlyphs(font, kCTFontHorizontalOrientation, glyphs,
boundingRects, count);
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698