diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-25 14:26:48 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-25 14:26:48 +0000 |
commit | ec95a4ae45e9bff1a92627372fd771b389813fec (patch) | |
tree | c2f4f0da101da9e51f47eb41f9388956e0deeb37 /src/sfnt/SkOTTable_OS_2.h | |
parent | 5df2a99861c61b5d967f8def1ff13514d0e1ed33 (diff) |
Remove multi-byte character constants.
http://codereview.appspot.com/6305117/
git-svn-id: http://skia.googlecode.com/svn/trunk@4317 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/sfnt/SkOTTable_OS_2.h')
-rw-r--r-- | src/sfnt/SkOTTable_OS_2.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/sfnt/SkOTTable_OS_2.h b/src/sfnt/SkOTTable_OS_2.h index 9e1f8a419b..3f744264ab 100644 --- a/src/sfnt/SkOTTable_OS_2.h +++ b/src/sfnt/SkOTTable_OS_2.h @@ -17,26 +17,34 @@ #pragma pack(push, 1) -union SkOTTableOS2 { - //original V0 TT - struct VA : SkOTTableOS2_VA { } vA; - struct V0 : SkOTTableOS2_V0 { } v0; - struct V1 : SkOTTableOS2_V1 { } v1; - struct V2 : SkOTTableOS2_V2 { } v2; - //makes fsType 0-3 exclusive - struct V3 : SkOTTableOS2_V3 { } v3; - //defines fsSelection bits 7-9 - struct V4 : SkOTTableOS2_V4 { } v4; +struct SkOTTableOS2 { + static const SK_OT_CHAR TAG0 = 'O'; + static const SK_OT_CHAR TAG1 = 'S'; + static const SK_OT_CHAR TAG2 = '/'; + static const SK_OT_CHAR TAG3 = '2'; + static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableOS2>::value; + + union Version { + //original V0 TT + struct VA : SkOTTableOS2_VA { } vA; + struct V0 : SkOTTableOS2_V0 { } v0; + struct V1 : SkOTTableOS2_V1 { } v1; + struct V2 : SkOTTableOS2_V2 { } v2; + //makes fsType 0-3 exclusive + struct V3 : SkOTTableOS2_V3 { } v3; + //defines fsSelection bits 7-9 + struct V4 : SkOTTableOS2_V4 { } v4; + } version; }; #pragma pack(pop) -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::VA) == 68, sizeof_SkOTTableOS2__VA_not_68); -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::V0) == 78, sizeof_SkOTTableOS2__V0_not_78); -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::V1) == 86, sizeof_SkOTTableOS2__V1_not_86); -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::V2) == 96, sizeof_SkOTTableOS2__V2_not_96); -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::V3) == 96, sizeof_SkOTTableOS2__V3_not_96); -SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::V4) == 96, sizeof_SkOTTableOS2__V4_not_96); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::VA) == 68, sizeof_SkOTTableOS2__VA_not_68); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V0) == 78, sizeof_SkOTTableOS2__V0_not_78); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V1) == 86, sizeof_SkOTTableOS2__V1_not_86); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V2) == 96, sizeof_SkOTTableOS2__V2_not_96); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V3) == 96, sizeof_SkOTTableOS2__V3_not_96); +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V4) == 96, sizeof_SkOTTableOS2__V4_not_96); #endif |