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

Unified Diff: Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp

Issue 316113002: Explicitly cast from HarfBuzz type to shorter type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp
diff --git a/Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp b/Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp
index 5deb6772fe8361a87ec3b8c001df546fa2545028..64e30d48a78426b374c252d43310ad833d6f19da 100644
--- a/Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp
+++ b/Source/platform/fonts/harfbuzz/HarfBuzzFaceSkia.cpp
@@ -128,7 +128,7 @@ static hb_position_t harfBuzzGetGlyphHorizontalKerning(hb_font_t*, void* fontDat
SkTypeface* typeface = hbFontData->m_paint.getTypeface();
- const uint16_t glyphs[2] = { leftGlyph, rightGlyph };
+ const uint16_t glyphs[2] = { static_cast<uint16_t>(leftGlyph), static_cast<uint16_t>(rightGlyph) };
int32_t kerningAdjustments[1] = { 0 };
if (typeface->getKerningPairAdjustments(glyphs, 2, kerningAdjustments)) {
@@ -150,7 +150,7 @@ static hb_position_t harfBuzzGetGlyphVerticalKerning(hb_font_t*, void* fontData,
SkTypeface* typeface = hbFontData->m_paint.getTypeface();
- const uint16_t glyphs[2] = { topGlyph, bottomGlyph };
+ const uint16_t glyphs[2] = { static_cast<uint16_t>(topGlyph), static_cast<uint16_t>(bottomGlyph) };
int32_t kerningAdjustments[1] = { 0 };
if (typeface->getKerningPairAdjustments(glyphs, 2, kerningAdjustments)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698