aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sfnt/SkOTTable_OS_2_V0.h
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 03:13:48 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-12 03:13:48 +0000
commit3258a5348beb721ee47fbe8928d78b0bf0fed5bd (patch)
tree54d63c1595932cf7752a6b5be73bbe2c4df30c3d /src/sfnt/SkOTTable_OS_2_V0.h
parent2cccf833265a607be62f1d77ee51662b49d9e813 (diff)
Fix (1 << 31) to (1u << 31) in SkOTTable_OS_2.
When ints are 32 bits, (1 << 31) is undefined. R=reed@google.com Review URL: https://codereview.chromium.org/189093020 git-svn-id: http://skia.googlecode.com/svn/trunk@13757 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/sfnt/SkOTTable_OS_2_V0.h')
-rw-r--r--src/sfnt/SkOTTable_OS_2_V0.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sfnt/SkOTTable_OS_2_V0.h b/src/sfnt/SkOTTable_OS_2_V0.h
index 14d322f7ce..b65bcf7f63 100644
--- a/src/sfnt/SkOTTable_OS_2_V0.h
+++ b/src/sfnt/SkOTTable_OS_2_V0.h
@@ -76,10 +76,10 @@ struct SkOTTableOS2_V0 {
Reserved07)
} field;
struct Raw {
- static const SK_OT_USHORT Installable = SkTEndian_SwapBE16(0);
- static const SK_OT_USHORT RestrictedMask = SkTEndian_SwapBE16(1 << 1);
- static const SK_OT_USHORT PreviewPrintMask = SkTEndian_SwapBE16(1 << 2);
- static const SK_OT_USHORT EditableMask = SkTEndian_SwapBE16(1 << 3);
+ static const SK_OT_USHORT Installable = 0;
+ static const SK_OT_USHORT RestrictedMask = SkOTSetUSHORTBit<1>::value;
+ static const SK_OT_USHORT PreviewPrintMask = SkOTSetUSHORTBit<2>::value;
+ static const SK_OT_USHORT EditableMask = SkOTSetUSHORTBit<3>::value;
SK_OT_USHORT value;
} raw;
} fsType;
@@ -121,13 +121,13 @@ struct SkOTTableOS2_V0 {
Reserved07)
} field;
struct Raw {
- static const SK_OT_USHORT ItalicMask = SkTEndian_SwapBE16(1 << 0);
- static const SK_OT_USHORT UnderscoreMask = SkTEndian_SwapBE16(1 << 1);
- static const SK_OT_USHORT NegativeMask = SkTEndian_SwapBE16(1 << 2);
- static const SK_OT_USHORT OutlinedMask = SkTEndian_SwapBE16(1 << 3);
- static const SK_OT_USHORT StrikeoutMask = SkTEndian_SwapBE16(1 << 4);
- static const SK_OT_USHORT BoldMask = SkTEndian_SwapBE16(1 << 5);
- static const SK_OT_USHORT RegularMask = SkTEndian_SwapBE16(1 << 6);
+ static const SK_OT_USHORT ItalicMask = SkOTSetUSHORTBit<0>::value;
+ static const SK_OT_USHORT UnderscoreMask = SkOTSetUSHORTBit<1>::value;
+ static const SK_OT_USHORT NegativeMask = SkOTSetUSHORTBit<2>::value;
+ static const SK_OT_USHORT OutlinedMask = SkOTSetUSHORTBit<3>::value;
+ static const SK_OT_USHORT StrikeoutMask = SkOTSetUSHORTBit<4>::value;
+ static const SK_OT_USHORT BoldMask = SkOTSetUSHORTBit<5>::value;
+ static const SK_OT_USHORT RegularMask = SkOTSetUSHORTBit<6>::value;
SK_OT_USHORT value;
} raw;
} fsSelection;