Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
83e3eabd
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
83e3eabd
编写于
5月 07, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Whitespace
上级
2b9402a8
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
50 addition
and
50 deletion
+50
-50
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+1
-1
src/hb-aat-layout-kerx-table.hh
src/hb-aat-layout-kerx-table.hh
+1
-1
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+1
-1
src/hb-algs.hh
src/hb-algs.hh
+3
-3
src/hb-dispatch.hh
src/hb-dispatch.hh
+1
-1
src/hb-open-type.hh
src/hb-open-type.hh
+9
-9
src/hb-ot-kern-table.hh
src/hb-ot-kern-table.hh
+2
-2
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+1
-1
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+8
-8
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+7
-7
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+4
-4
src/hb-sanitize.hh
src/hb-sanitize.hh
+3
-3
src/hb-serialize.hh
src/hb-serialize.hh
+6
-6
src/hb-subset.hh
src/hb-subset.hh
+3
-3
未找到文件。
src/hb-aat-layout-common.hh
浏览文件 @
83e3eabd
...
...
@@ -154,7 +154,7 @@ struct LookupSegmentArray
valuesZ
.
sanitize
(
c
,
base
,
last
-
first
+
1
));
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
...
...
src/hb-aat-layout-kerx-table.hh
浏览文件 @
83e3eabd
...
...
@@ -772,7 +772,7 @@ struct KerxSubTable
unsigned
int
get_type
()
const
{
return
u
.
header
.
coverage
&
u
.
header
.
SubtableType
;
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
...
...
src/hb-aat-layout-morx-table.hh
浏览文件 @
83e3eabd
...
...
@@ -884,7 +884,7 @@ struct ChainSubtable
};
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
...
...
src/hb-algs.hh
浏览文件 @
83e3eabd
...
...
@@ -75,7 +75,7 @@ struct
/* Pointer-to-member-function. */
template
<
typename
Appl
,
typename
Val1
,
typename
...
Vals
>
auto
impl
(
Appl
&&
a
,
hb_priority
<
2
>
,
Val1
&&
v1
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
impl
(
Appl
&&
a
,
hb_priority
<
2
>
,
Val1
&&
v1
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
((
hb_deref
(
hb_forward
<
Val1
>
(
v1
)).
*
hb_forward
<
Appl
>
(
a
))
(
hb_forward
<
Vals
>
(
vs
)...))
/* Pointer-to-member. */
...
...
@@ -85,13 +85,13 @@ struct
/* Operator(). */
template
<
typename
Appl
,
typename
...
Vals
>
auto
impl
(
Appl
&&
a
,
hb_priority
<
0
>
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
impl
(
Appl
&&
a
,
hb_priority
<
0
>
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
(
hb_deref
(
hb_forward
<
Appl
>
(
a
))
(
hb_forward
<
Vals
>
(
vs
)...))
public:
template
<
typename
Appl
,
typename
...
Vals
>
auto
operator
()
(
Appl
&&
a
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
operator
()
(
Appl
&&
a
,
Vals
&&
...
vs
)
const
HB_AUTO_RETURN
(
impl
(
hb_forward
<
Appl
>
(
a
),
hb_prioritize
,
...
...
src/hb-dispatch.hh
浏览文件 @
83e3eabd
...
...
@@ -48,7 +48,7 @@ struct hb_dispatch_context_t
template
<
typename
T
,
typename
F
>
bool
may_dispatch
(
const
T
*
obj
HB_UNUSED
,
const
F
*
format
HB_UNUSED
)
{
return
true
;
}
template
<
typename
T
,
typename
...
Ts
>
return_t
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
return_t
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
{
return
obj
.
dispatch
(
thiz
(),
hb_forward
<
Ts
>
(
ds
)...);
}
static
return_t
no_dispatch_return_value
()
{
return
Context
::
default_return_value
();
}
static
bool
stop_sublookup_iteration
(
const
return_t
r
HB_UNUSED
)
{
return
false
;
}
...
...
src/hb-open-type.hh
浏览文件 @
83e3eabd
...
...
@@ -285,7 +285,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
}
template
<
typename
...
Ts
>
bool
serialize_subset
(
hb_subset_context_t
*
c
,
const
Type
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
bool
serialize_subset
(
hb_subset_context_t
*
c
,
const
Type
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
{
*
this
=
0
;
if
(
has_null
&&
&
src
==
_hb_has_null
<
Type
,
has_null
>::
get_null
())
...
...
@@ -307,7 +307,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
/* TODO: Somehow merge this with previous function into a serialize_dispatch(). */
template
<
typename
...
Ts
>
bool
serialize_copy
(
hb_serialize_context_t
*
c
,
const
Type
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
bool
serialize_copy
(
hb_serialize_context_t
*
c
,
const
Type
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
{
*
this
=
0
;
if
(
has_null
&&
&
src
==
_hb_has_null
<
Type
,
has_null
>::
get_null
())
...
...
@@ -332,7 +332,7 @@ struct OffsetTo : Offset<OffsetType, has_null>
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
void
*
base
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
sanitize_shallow
(
c
,
base
)
&&
...
...
@@ -465,7 +465,7 @@ struct UnsizedArrayOf
return_trace
(
true
);
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
count
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
count
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
if
(
unlikely
(
!
sanitize_shallow
(
c
,
count
)))
return_trace
(
false
);
...
...
@@ -511,7 +511,7 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
count
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
count
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
((
UnsizedOffsetArrayOf
<
Type
,
OffsetType
,
has_null
>
...
...
@@ -647,7 +647,7 @@ struct ArrayOf
return_trace
(
true
);
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
if
(
unlikely
(
!
sanitize_shallow
(
c
)))
return_trace
(
false
);
...
...
@@ -721,7 +721,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
OffsetArrayOf
<
Type
>::
sanitize
(
c
,
this
,
hb_forward
<
Ts
>
(
ds
)...));
...
...
@@ -823,7 +823,7 @@ struct ArrayOfM1
{
return
lenM1
.
static_size
+
(
lenM1
+
1
)
*
Type
::
static_size
;
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
if
(
unlikely
(
!
sanitize_shallow
(
c
)))
return_trace
(
false
);
...
...
@@ -1028,7 +1028,7 @@ struct VarSizedBinSearchArrayOf
return_trace
(
true
);
}
template
<
typename
...
Ts
>
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
bool
sanitize
(
hb_sanitize_context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_SANITIZE
(
this
);
if
(
unlikely
(
!
sanitize_shallow
(
c
)))
return_trace
(
false
);
...
...
src/hb-ot-kern-table.hh
浏览文件 @
83e3eabd
...
...
@@ -122,7 +122,7 @@ struct KernSubTable
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
...
...
@@ -305,7 +305,7 @@ struct kern
{
return
dispatch
(
c
);
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
...
...
src/hb-ot-layout-common.hh
浏览文件 @
83e3eabd
...
...
@@ -683,7 +683,7 @@ struct Lookup
}
template
<
typename
TSubTable
,
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
unsigned
int
lookup_type
=
get_type
();
TRACE_DISPATCH
(
this
,
lookup_type
);
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
83e3eabd
...
...
@@ -577,7 +577,7 @@ struct SinglePosFormat2
struct
SinglePos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -908,7 +908,7 @@ struct PairPosFormat2
struct
PairPos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1093,7 +1093,7 @@ struct CursivePosFormat1
struct
CursivePos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1209,7 +1209,7 @@ struct MarkBasePosFormat1
struct
MarkBasePos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1334,7 +1334,7 @@ struct MarkLigPosFormat1
struct
MarkLigPos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1456,7 +1456,7 @@ struct MarkMarkPosFormat1
struct
MarkMarkPos
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1508,7 +1508,7 @@ struct PosLookupSubTable
};
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
unsigned
int
lookup_type
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
unsigned
int
lookup_type
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
lookup_type
);
switch
(
lookup_type
)
{
...
...
@@ -1582,7 +1582,7 @@ struct PosLookup : Lookup
static
typename
context_t
::
return_t
dispatch_recurse_func
(
context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
,
hb_forward
<
Ts
>
(
ds
)...);
}
bool
subset
(
hb_subset_context_t
*
c
)
const
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
83e3eabd
...
...
@@ -252,7 +252,7 @@ struct SingleSubst
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -441,7 +441,7 @@ struct MultipleSubst
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -615,7 +615,7 @@ struct AlternateSubst
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -946,7 +946,7 @@ struct LigatureSubst
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1114,7 +1114,7 @@ struct ReverseChainSingleSubstFormat1
struct
ReverseChainSingleSubst
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -1154,7 +1154,7 @@ struct SubstLookupSubTable
};
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
unsigned
int
lookup_type
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
unsigned
int
lookup_type
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
lookup_type
);
switch
(
lookup_type
)
{
...
...
@@ -1332,7 +1332,7 @@ struct SubstLookup : Lookup
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
return
Lookup
::
dispatch
<
SubTable
>
(
c
,
hb_forward
<
Ts
>
(
ds
)...);
}
bool
subset
(
hb_subset_context_t
*
c
)
const
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
83e3eabd
...
...
@@ -1764,7 +1764,7 @@ struct ContextFormat3
struct
Context
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -2475,7 +2475,7 @@ struct ChainContextFormat3
struct
ChainContext
{
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -2511,7 +2511,7 @@ struct ExtensionFormat1
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
this
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
@@ -2558,7 +2558,7 @@ struct Extension
}
template
<
typename
context_t
,
typename
...
Ts
>
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
typename
context_t
::
return_t
dispatch
(
context_t
*
c
,
Ts
&&
...
ds
)
const
{
TRACE_DISPATCH
(
this
,
u
.
format
);
if
(
unlikely
(
!
c
->
may_dispatch
(
this
,
&
u
.
format
)))
return_trace
(
c
->
no_dispatch_return_value
());
...
...
src/hb-sanitize.hh
浏览文件 @
83e3eabd
...
...
@@ -136,14 +136,14 @@ struct hb_sanitize_context_t :
private:
template
<
typename
T
,
typename
...
Ts
>
auto
_dispatch
(
const
T
&
obj
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
_dispatch
(
const
T
&
obj
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
obj
.
sanitize
(
this
,
hb_forward
<
Ts
>
(
ds
)...)
)
template
<
typename
T
,
typename
...
Ts
>
auto
_dispatch
(
const
T
&
obj
,
hb_priority
<
0
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
_dispatch
(
const
T
&
obj
,
hb_priority
<
0
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
obj
.
dispatch
(
this
,
hb_forward
<
Ts
>
(
ds
)...)
)
public:
template
<
typename
T
,
typename
...
Ts
>
auto
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
_dispatch
(
obj
,
hb_prioritize
,
hb_forward
<
Ts
>
(
ds
)...)
)
...
...
src/hb-serialize.hh
浏览文件 @
83e3eabd
...
...
@@ -134,7 +134,7 @@ struct hb_serialize_context_t
template
<
typename
T
>
bool
propagate_error
(
T
&&
obj
)
{
return
check_success
(
!
hb_deref
(
obj
).
in_error
());
}
template
<
typename
T1
,
typename
...
Ts
>
bool
propagate_error
(
T1
&&
o1
,
Ts
&&
...
os
)
template
<
typename
T1
,
typename
...
Ts
>
bool
propagate_error
(
T1
&&
o1
,
Ts
&&
...
os
)
{
return
propagate_error
(
hb_forward
<
T1
>
(
o1
))
&&
propagate_error
(
hb_forward
<
Ts
>
(
os
)...);
}
...
...
@@ -371,7 +371,7 @@ struct hb_serialize_context_t
{
return
embed
(
hb_addressof
(
obj
));
}
template
<
typename
Type
,
typename
...
Ts
>
auto
_copy
(
const
Type
&
src
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_RETURN
_copy
(
const
Type
&
src
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_RETURN
(
Type
*
,
src
.
copy
(
this
,
hb_forward
<
Ts
>
(
ds
)...))
template
<
typename
Type
>
auto
...
...
@@ -386,10 +386,10 @@ struct hb_serialize_context_t
/* Like embed, but active: calls obj.operator=() or obj.copy() to transfer data
* instead of memcpy(). */
template
<
typename
Type
,
typename
...
Ts
>
Type
*
copy
(
const
Type
&
src
,
Ts
&&
...
ds
)
Type
*
copy
(
const
Type
&
src
,
Ts
&&
...
ds
)
{
return
_copy
(
src
,
hb_prioritize
,
hb_forward
<
Ts
>
(
ds
)...);
}
template
<
typename
Type
,
typename
...
Ts
>
Type
*
copy
(
const
Type
*
src
,
Ts
&&
...
ds
)
Type
*
copy
(
const
Type
*
src
,
Ts
&&
...
ds
)
{
return
copy
(
*
src
,
hb_forward
<
Ts
>
(
ds
)...);
}
template
<
typename
Type
>
...
...
@@ -414,10 +414,10 @@ struct hb_serialize_context_t
Type
*
extend_min
(
Type
&
obj
)
{
return
extend_min
(
hb_addressof
(
obj
));
}
template
<
typename
Type
,
typename
...
Ts
>
Type
*
extend
(
Type
*
obj
,
Ts
&&
...
ds
)
Type
*
extend
(
Type
*
obj
,
Ts
&&
...
ds
)
{
return
extend_size
(
obj
,
obj
->
get_size
(
hb_forward
<
Ts
>
(
ds
)...));
}
template
<
typename
Type
,
typename
...
Ts
>
Type
*
extend
(
Type
&
obj
,
Ts
&&
...
ds
)
Type
*
extend
(
Type
&
obj
,
Ts
&&
...
ds
)
{
return
extend
(
hb_addressof
(
obj
),
hb_forward
<
Ts
>
(
ds
)...);
}
/* Output routines. */
...
...
src/hb-subset.hh
浏览文件 @
83e3eabd
...
...
@@ -44,14 +44,14 @@ struct hb_subset_context_t :
private:
template
<
typename
T
,
typename
...
Ts
>
auto
_dispatch
(
const
T
&
obj
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
_dispatch
(
const
T
&
obj
,
hb_priority
<
1
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
obj
.
subset
(
this
,
hb_forward
<
Ts
>
(
ds
)...)
)
template
<
typename
T
,
typename
...
Ts
>
auto
_dispatch
(
const
T
&
obj
,
hb_priority
<
0
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
_dispatch
(
const
T
&
obj
,
hb_priority
<
0
>
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
obj
.
dispatch
(
this
,
hb_forward
<
Ts
>
(
ds
)...)
)
public:
template
<
typename
T
,
typename
...
Ts
>
auto
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
dispatch
(
const
T
&
obj
,
Ts
&&
...
ds
)
HB_AUTO_RETURN
(
_dispatch
(
obj
,
hb_prioritize
,
hb_forward
<
Ts
>
(
ds
)...)
)
hb_subset_plan_t
*
plan
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录