summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
commit3ebd121d45ceb08918a3dcb5b3b7ac29448c862f (patch)
tree361d5fa0f9be7484cce4aace1b9cc18545046611 /core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
parent317758574e173367b41928a1575d70600c6b6ea8 (diff)
downloadpdfium-3ebd121d45ceb08918a3dcb5b3b7ac29448c862f.tar.xz
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 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp8
1 files changed, 5 insertions, 3 deletions
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);