Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
65aeabd6
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
65aeabd6
编写于
5月 23, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add hb_vector_t::push(const Type &v)
Makes for cleaner code.
上级
38ae0add
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
24 deletion
+20
-24
src/hb-coretext.cc
src/hb-coretext.cc
+1
-2
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+1
-2
src/hb-private.hh
src/hb-private.hh
+11
-7
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+5
-7
src/hb-uniscribe.cc
src/hb-uniscribe.cc
+2
-6
未找到文件。
src/hb-coretext.cc
浏览文件 @
65aeabd6
...
...
@@ -770,10 +770,9 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
}
if
(
event
->
start
)
{
active_feature_t
*
feature
=
active_features
.
push
();
active_feature_t
*
feature
=
active_features
.
push
(
event
->
feature
);
if
(
unlikely
(
!
feature
))
goto
fail_features
;
*
feature
=
event
->
feature
;
}
else
{
active_feature_t
*
feature
=
active_features
.
find
(
&
event
->
feature
);
if
(
feature
)
...
...
src/hb-ot-post-table.hh
浏览文件 @
65aeabd6
...
...
@@ -126,10 +126,9 @@ struct post
const
uint8_t
*
end
=
(
uint8_t
*
)
table
+
table_length
;
for
(
const
uint8_t
*
data
=
pool
;
data
<
end
&&
data
+
*
data
<=
end
;
data
+=
1
+
*
data
)
{
uint32_t
*
offset
=
index_to_offset
.
push
();
uint32_t
*
offset
=
index_to_offset
.
push
(
data
-
pool
);
if
(
unlikely
(
!
offset
))
break
;
*
offset
=
data
-
pool
;
}
}
inline
void
fini
(
void
)
...
...
src/hb-private.hh
浏览文件 @
65aeabd6
...
...
@@ -551,9 +551,17 @@ struct hb_vector_t
return
&
arrayZ
[
len
-
1
];
}
inline
Type
*
push
(
const
Type
&
v
)
{
if
(
unlikely
(
!
resize
(
len
+
1
)))
return
nullptr
;
arrayZ
[
len
-
1
]
=
v
;
return
&
arrayZ
[
len
-
1
];
}
/* Allocate for size but don't adjust len. */
inline
bool
alloc
(
unsigned
int
size
)
inline
bool
alloc
(
unsigned
int
size
)
{
if
(
likely
(
size
<=
allocated
))
return
true
;
...
...
@@ -738,9 +746,7 @@ struct hb_lockable_set_t
l
.
unlock
();
}
}
else
{
item
=
items
.
push
();
if
(
likely
(
item
))
*
item
=
v
;
item
=
items
.
push
(
v
);
l
.
unlock
();
}
return
item
;
...
...
@@ -779,9 +785,7 @@ struct hb_lockable_set_t
l
.
lock
();
item_t
*
item
=
items
.
find
(
v
);
if
(
!
item
)
{
item
=
items
.
push
();
if
(
likely
(
item
))
*
item
=
v
;
item
=
items
.
push
(
v
);
}
l
.
unlock
();
return
item
;
...
...
src/hb-subset-plan.cc
浏览文件 @
65aeabd6
...
...
@@ -91,10 +91,8 @@ _populate_codepoints (hb_set_t *input_codepoints,
{
plan_codepoints
.
alloc
(
hb_set_get_population
(
input_codepoints
));
hb_codepoint_t
cp
=
-
1
;
while
(
hb_set_next
(
input_codepoints
,
&
cp
))
{
hb_codepoint_t
*
wr
=
plan_codepoints
.
push
();
*
wr
=
cp
;
}
while
(
hb_set_next
(
input_codepoints
,
&
cp
))
plan_codepoints
.
push
(
cp
);
plan_codepoints
.
qsort
(
_hb_codepoint_t_cmp
);
}
...
...
@@ -139,9 +137,9 @@ _populate_gids_to_retain (hb_face_t *face,
if
(
!
cmap
.
get_nominal_glyph
(
codepoints
[
i
],
&
gid
))
{
gid
=
-
1
;
*
(
bad_indices
.
push
())
=
i
;
bad_indices
.
push
(
i
)
;
}
*
(
old_gids
.
push
())
=
gid
;
old_gids
.
push
(
gid
)
;
}
/* Generally there shouldn't be any */
...
...
@@ -166,7 +164,7 @@ _populate_gids_to_retain (hb_face_t *face,
old_gids_sorted
.
alloc
(
hb_set_get_population
(
all_gids_to_retain
));
hb_codepoint_t
gid
=
HB_SET_VALUE_INVALID
;
while
(
hb_set_next
(
all_gids_to_retain
,
&
gid
))
*
(
old_gids_sorted
.
push
())
=
gid
;
old_gids_sorted
.
push
(
gid
)
;
hb_set_destroy
(
all_gids_to_retain
);
glyf
.
fini
();
...
...
src/hb-uniscribe.cc
浏览文件 @
65aeabd6
...
...
@@ -696,10 +696,8 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
{
if
(
!
j
||
active_features
[
j
].
rec
.
tagFeature
!=
feature_records
[
feature_records
.
len
-
1
].
tagFeature
)
{
OPENTYPE_FEATURE_RECORD
*
feature
=
feature_records
.
push
();
if
(
unlikely
(
!
feature
))
if
(
unlikely
(
!
feature_records
.
push
(
active_features
[
j
].
rec
)))
goto
fail_features
;
*
feature
=
active_features
[
j
].
rec
;
}
else
{
...
...
@@ -719,10 +717,8 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan,
}
if
(
event
->
start
)
{
active_feature_t
*
feature
=
active_features
.
push
();
if
(
unlikely
(
!
feature
))
if
(
unlikely
(
!
active_features
.
push
(
event
->
feature
)))
goto
fail_features
;
*
feature
=
event
->
feature
;
}
else
{
active_feature_t
*
feature
=
active_features
.
find
(
&
event
->
feature
);
if
(
feature
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录