提交 ad717822 编写于 作者: B Behdad Esfahbod

[USE] Use a couple warnings

上级 a85c4da9
......@@ -432,15 +432,6 @@ occupancy = used * 100. / total
page_bits = 12
print "}; /* Table items: %d; occupancy: %d%% */" % (offset, occupancy)
print
for k in sorted(use_mapping.keys()):
if k in use_positions and use_positions[k]: continue
print "#undef %s" % k
for k,v in sorted(use_positions.items()):
if not v: continue
for suf in v.keys():
tag = k + suf
print "#undef %s" % tag
print
print "USE_TABLE_ELEMENT_TYPE"
print "hb_use_get_categories (hb_codepoint_t u)"
print "{"
......@@ -455,7 +446,7 @@ for p in sorted(pages):
print " if (hb_in_range (u, 0x%04Xu, 0x%04Xu)) return use_table[u - 0x%04Xu + %s];" % (start, end-1, start, offset)
for u,d in singles.items ():
if p != u>>page_bits: continue
print " if (unlikely (u == 0x%04Xu)) return USE_%s;" % (u, d[0])
print " if (unlikely (u == 0x%04Xu)) return %s;" % (u, d[0])
print " break;"
print ""
print " default:"
......@@ -464,6 +455,15 @@ print " }"
print " return USE_O;"
print "}"
print
for k in sorted(use_mapping.keys()):
if k in use_positions and use_positions[k]: continue
print "#undef %s" % k
for k,v in sorted(use_positions.items()):
if not v: continue
for suf in v.keys():
tag = k + suf
print "#undef %s" % tag
print
print "/* == End of generated table == */"
# Maintain at least 50% occupancy in the table */
......
......@@ -593,44 +593,6 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
}; /* Table items: 4784; occupancy: 72% */
#undef B
#undef CGJ
#undef FM
#undef GB
#undef H
#undef HN
#undef IND
#undef IV
#undef N
#undef O
#undef R
#undef Rsv
#undef S
#undef SUB
#undef VS
#undef WJ
#undef ZWJ
#undef ZWNJ
#undef CMBlw
#undef CMAbv
#undef FBlw
#undef FPst
#undef FAbv
#undef MPre
#undef MBlw
#undef MPst
#undef MAbv
#undef SMBlw
#undef SMAbv
#undef VPre
#undef VBlw
#undef VPst
#undef VAbv
#undef VMPre
#undef VMBlw
#undef VMPst
#undef VMAbv
USE_TABLE_ELEMENT_TYPE
hb_use_get_categories (hb_codepoint_t u)
{
......@@ -640,7 +602,7 @@ hb_use_get_categories (hb_codepoint_t u)
if (hb_in_range (u, 0x0028u, 0x003Fu)) return use_table[u - 0x0028u + use_offset_0x0028u];
if (hb_in_range (u, 0x00A0u, 0x00D7u)) return use_table[u - 0x00A0u + use_offset_0x00a0u];
if (hb_in_range (u, 0x0900u, 0x0DF7u)) return use_table[u - 0x0900u + use_offset_0x0900u];
if (unlikely (u == 0x034Fu)) return USE_CGJ;
if (unlikely (u == 0x034Fu)) return CGJ;
break;
case 0x1u:
......@@ -654,7 +616,7 @@ hb_use_get_categories (hb_codepoint_t u)
case 0x2u:
if (hb_in_range (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
if (hb_in_range (u, 0x2070u, 0x2087u)) return use_table[u - 0x2070u + use_offset_0x2070u];
if (unlikely (u == 0x25CCu)) return USE_GB;
if (unlikely (u == 0x25CCu)) return GB;
break;
case 0xAu:
......@@ -672,7 +634,7 @@ hb_use_get_categories (hb_codepoint_t u)
if (hb_in_range (u, 0x11280u, 0x11377u)) return use_table[u - 0x11280u + use_offset_0x11280u];
if (hb_in_range (u, 0x11480u, 0x114DFu)) return use_table[u - 0x11480u + use_offset_0x11480u];
if (hb_in_range (u, 0x11580u, 0x1173Fu)) return use_table[u - 0x11580u + use_offset_0x11580u];
if (unlikely (u == 0x1107Fu)) return USE_HN;
if (unlikely (u == 0x1107Fu)) return HN;
break;
default:
......@@ -681,4 +643,42 @@ hb_use_get_categories (hb_codepoint_t u)
return USE_O;
}
#undef B
#undef CGJ
#undef FM
#undef GB
#undef H
#undef HN
#undef IND
#undef IV
#undef N
#undef O
#undef R
#undef Rsv
#undef S
#undef SUB
#undef VS
#undef WJ
#undef ZWJ
#undef ZWNJ
#undef CMBlw
#undef CMAbv
#undef FBlw
#undef FPst
#undef FAbv
#undef MPre
#undef MBlw
#undef MPst
#undef MAbv
#undef SMBlw
#undef SMAbv
#undef VPre
#undef VBlw
#undef VPst
#undef VAbv
#undef VMPre
#undef VMBlw
#undef VMPst
#undef VMAbv
/* == End of generated table == */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册