From 3ebd121d45ceb08918a3dcb5b3b7ac29448c862f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 9 Mar 2016 09:59:23 -0500 Subject: Review and cleanup lint warnings. This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 . --- core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/src/fpdfapi/fpdf_edit') diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 8b1571a496..df9c13714d 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); -- cgit v1.2.3