Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
88fdeeec
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
88fdeeec
编写于
5月 02, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[serialize] Take arguments in copy()
上级
273ed612
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
7 deletion
+9
-7
src/hb-open-type.hh
src/hb-open-type.hh
+3
-3
src/hb-serialize.hh
src/hb-serialize.hh
+6
-4
未找到文件。
src/hb-open-type.hh
浏览文件 @
88fdeeec
...
@@ -305,8 +305,8 @@ struct OffsetTo : Offset<OffsetType, has_null>
...
@@ -305,8 +305,8 @@ struct OffsetTo : Offset<OffsetType, has_null>
return
ret
;
return
ret
;
}
}
template
<
typename
T
>
template
<
typename
T
,
typename
...
Ts
>
bool
serialize_copy
(
hb_serialize_context_t
*
c
,
const
T
&
src
,
const
void
*
base
)
bool
serialize_copy
(
hb_serialize_context_t
*
c
,
const
T
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
{
{
*
this
=
0
;
*
this
=
0
;
if
(
has_null
&&
&
src
==
&
Null
(
T
))
if
(
has_null
&&
&
src
==
&
Null
(
T
))
...
@@ -314,7 +314,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
...
@@ -314,7 +314,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
c
->
push
();
c
->
push
();
c
->
copy
(
src
);
c
->
copy
(
src
,
hb_forward
<
Ts
>
(
ds
)...
);
c
->
add_link
(
*
this
,
c
->
pop_pack
(),
base
);
c
->
add_link
(
*
this
,
c
->
pop_pack
(),
base
);
}
}
...
...
src/hb-serialize.hh
浏览文件 @
88fdeeec
...
@@ -366,8 +366,9 @@ struct hb_serialize_context_t
...
@@ -366,8 +366,9 @@ struct hb_serialize_context_t
return
ret
;
return
ret
;
}
}
template
<
typename
Type
>
auto
template
<
typename
Type
,
typename
...
Ts
>
auto
_copy
(
const
Type
&
obj
,
hb_priority
<
1
>
)
const
HB_RETURN
(
Type
*
,
obj
.
copy
(
this
))
_copy
(
const
Type
&
obj
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
const
HB_RETURN
(
Type
*
,
obj
.
copy
(
this
,
hb_forward
<
Ts
>
(
ds
)...))
template
<
typename
Type
>
auto
template
<
typename
Type
>
auto
_copy
(
const
Type
&
obj
,
hb_priority
<
0
>
)
const
->
decltype
(
&
(
obj
=
obj
))
_copy
(
const
Type
&
obj
,
hb_priority
<
0
>
)
const
->
decltype
(
&
(
obj
=
obj
))
...
@@ -380,8 +381,9 @@ struct hb_serialize_context_t
...
@@ -380,8 +381,9 @@ struct hb_serialize_context_t
/* Like embed, but active: calls obj.operator=() or obj.copy() to transfer data
/* Like embed, but active: calls obj.operator=() or obj.copy() to transfer data
* instead of memcpy(). */
* instead of memcpy(). */
template
<
typename
Type
>
template
<
typename
Type
,
typename
...
Ts
>
Type
*
copy
(
const
Type
&
obj
)
{
return
_copy
(
obj
,
hb_prioritize
);
}
Type
*
copy
(
const
Type
&
obj
,
Ts
&&
...
ds
)
{
return
_copy
(
obj
,
hb_prioritize
,
hb_forward
<
Ts
>
(
ds
)...);
}
template
<
typename
Type
>
template
<
typename
Type
>
hb_serialize_context_t
&
operator
<<
(
const
Type
&
obj
)
{
embed
(
obj
);
return
*
this
;
}
hb_serialize_context_t
&
operator
<<
(
const
Type
&
obj
)
{
embed
(
obj
);
return
*
this
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录