Make some enum constants unsigned
This commit is contained in:
parent
3d9a6e6266
commit
271cb7c1c0
|
@ -77,7 +77,7 @@ struct LookupFormat0
|
|||
template <typename T>
|
||||
struct LookupSegmentSingle
|
||||
{
|
||||
enum { TerminationWordCount = 2 };
|
||||
enum { TerminationWordCount = 2u };
|
||||
|
||||
int cmp (hb_codepoint_t g) const
|
||||
{ return g < first ? -1 : g <= last ? 0 : +1 ; }
|
||||
|
@ -136,7 +136,7 @@ struct LookupFormat2
|
|||
template <typename T>
|
||||
struct LookupSegmentArray
|
||||
{
|
||||
enum { TerminationWordCount = 2 };
|
||||
enum { TerminationWordCount = 2u };
|
||||
|
||||
const T* get_value (hb_codepoint_t glyph_id, const void *base) const
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ struct LookupFormat4
|
|||
template <typename T>
|
||||
struct LookupSingle
|
||||
{
|
||||
enum { TerminationWordCount = 1 };
|
||||
enum { TerminationWordCount = 1u };
|
||||
|
||||
int cmp (hb_codepoint_t g) const { return glyph.cmp (g); }
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ struct hb_buffer_t
|
|||
/* Text before / after the main buffer contents.
|
||||
* Always in Unicode, and ordered outward.
|
||||
* Index 0 is for "pre-context", 1 for "post-context". */
|
||||
enum { CONTEXT_LENGTH = 5 };
|
||||
enum { CONTEXT_LENGTH = 5u };
|
||||
hb_codepoint_t context[2][CONTEXT_LENGTH];
|
||||
unsigned int context_len[2];
|
||||
|
||||
|
|
|
@ -1299,7 +1299,7 @@ hb_ot_layout_feature_get_characters (hb_face_t *face,
|
|||
|
||||
struct GSUBProxy
|
||||
{
|
||||
enum { table_index = 0 };
|
||||
enum { table_index = 0u };
|
||||
enum { inplace = false };
|
||||
typedef OT::SubstLookup Lookup;
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ struct GSUBProxy
|
|||
|
||||
struct GPOSProxy
|
||||
{
|
||||
enum { table_index = 1 };
|
||||
enum { table_index = 1u };
|
||||
enum { inplace = true };
|
||||
typedef OT::PosLookup Lookup;
|
||||
|
||||
|
@ -1387,7 +1387,7 @@ apply_string (OT::hb_ot_apply_context_t *c,
|
|||
if (likely (!lookup.is_reverse ()))
|
||||
{
|
||||
/* in/out forward substitution/positioning */
|
||||
if (Proxy::table_index == 0)
|
||||
if (Proxy::table_index == 0u)
|
||||
buffer->clear_output ();
|
||||
buffer->idx = 0;
|
||||
|
||||
|
@ -1404,7 +1404,7 @@ apply_string (OT::hb_ot_apply_context_t *c,
|
|||
else
|
||||
{
|
||||
/* in-place backward substitution/positioning */
|
||||
if (Proxy::table_index == 0)
|
||||
if (Proxy::table_index == 0u)
|
||||
buffer->remove_output ();
|
||||
buffer->idx = buffer->len - 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue