diff options
author | george@mozilla.com <george@mozilla.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-27 19:31:10 +0000 |
---|---|---|
committer | george@mozilla.com <george@mozilla.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-27 19:31:10 +0000 |
commit | 7c207e7435ef66cbcfea854b34d8329e58384108 (patch) | |
tree | 579085232731ad6a9caaf18950f4737476a52b3a /src/sfnt | |
parent | e7e4425f4aed49ae38240c2fd8e2752960a1d55a (diff) |
Explicitly cast to uin16_t to avoid an invalid implicit type narrowing.
This was causing a build failure on OS X for us:
SkOTTable_head.h:124:72: error: non-type template argument evaluates to -2, which cannot be narrowed to type 'uint16_t' (aka 'unsigned short') [-Wc++11-narrowing]
Review URL: https://codereview.appspot.com/6482067
git-svn-id: http://skia.googlecode.com/svn/trunk@5290 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/sfnt')
-rw-r--r-- | src/sfnt/SkOTTable_head.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sfnt/SkOTTable_head.h b/src/sfnt/SkOTTable_head.h index 67b696f49a..3d2c0f1113 100644 --- a/src/sfnt/SkOTTable_head.h +++ b/src/sfnt/SkOTTable_head.h @@ -120,8 +120,8 @@ struct SkOTTableHead { ((FullyMixedDirectionalGlyphs, SkTEndian_SwapBE16(0))) ((OnlyStronglyLTR, SkTEndian_SwapBE16(1))) ((StronglyLTR, SkTEndian_SwapBE16(2))) - ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-1)))) - ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16(-2)))) + ((OnlyStronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16((uint16_t)-1)))) + ((StronglyRTL, static_cast<SK_OT_SHORT>(SkTEndian_SwapBE16((uint16_t)-2)))) SK_SEQ_END, (value)SK_SEQ_END) } fontDirectionHint; |