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

Unified Diff: src/sfnt/SkOTTableTypes.h

Issue 189093020: Fix (1 << 31) to (1u << 31) in SkOTTable_OS_2. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Pedantic Created 6 years, 9 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 | « include/core/SkTypes.h ('k') | src/sfnt/SkOTTable_OS_2_V0.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sfnt/SkOTTableTypes.h
===================================================================
--- src/sfnt/SkOTTableTypes.h (revision 13776)
+++ src/sfnt/SkOTTableTypes.h (working copy)
@@ -8,6 +8,7 @@
#ifndef SkOTTableTypes_DEFINED
#define SkOTTableTypes_DEFINED
+#include "SkTemplates.h"
#include "SkTypes.h"
#include "SkEndian.h"
@@ -45,4 +46,16 @@
);
};
+/** SkOTSetUSHORTBit<N>::value is an SK_OT_USHORT with the Nth BE bit set. */
+template <unsigned N> struct SkOTSetUSHORTBit {
+ static const uint16_t bit = SkTSetBit<N, uint16_t>::value;
+ static const SK_OT_USHORT value = SkTEndian_SwapBE16(bit);
+};
+
+/** SkOTSetUSHORTBit<N>::value is an SK_OT_ULONG with the Nth BE bit set. */
+template <unsigned N> struct SkOTSetULONGBit {
+ static const uint32_t bit = SkTSetBit<N, uint32_t>::value;
+ static const SK_OT_ULONG value = SkTEndian_SwapBE32(bit);
+};
+
#endif
« no previous file with comments | « include/core/SkTypes.h ('k') | src/sfnt/SkOTTable_OS_2_V0.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698