Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
849a0f17
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看板
提交
849a0f17
编写于
1月 29, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[iter] Add hb_iter_with_fallback_t instead
上级
4d40ed9d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
32 deletion
+17
-32
src/hb-array.hh
src/hb-array.hh
+1
-4
src/hb-iter.hh
src/hb-iter.hh
+13
-16
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+1
-4
src/hb-set.hh
src/hb-set.hh
+1
-4
src/test-iter.cc
src/test-iter.cc
+1
-4
未找到文件。
src/hb-array.hh
浏览文件 @
849a0f17
...
...
@@ -37,10 +37,7 @@ template <typename Type>
struct
hb_sorted_array_t
;
template
<
typename
Type
>
struct
hb_array_t
:
hb_iter_with_mixin_t
<
hb_iter_fallback_mixin_t
,
hb_array_t
<
Type
>
,
Type
&>
struct
hb_array_t
:
hb_iter_with_fallback_t
<
hb_array_t
<
Type
>
,
Type
&>
{
/*
* Constructors.
...
...
src/hb-iter.hh
浏览文件 @
849a0f17
...
...
@@ -132,19 +132,6 @@ template <typename Type, unsigned int length> hb_array_t<Type>
hb_iter
(
Type
(
&
array
)[
length
])
{
return
hb_iter
(
array
,
length
);
}
template
<
template
<
typename
iter_t
,
typename
item_t
>
class
mixin_t
,
typename
iter_t
,
typename
item_t
=
typename
iter_t
::
__item_t__
>
struct
hb_iter_with_mixin_t
:
hb_iter_t
<
iter_t
,
item_t
>
,
mixin_t
<
iter_t
,
item_t
>
{
protected:
hb_iter_with_mixin_t
()
{}
hb_iter_with_mixin_t
(
const
hb_iter_with_mixin_t
&
o
HB_UNUSED
)
{}
void
operator
=
(
const
hb_iter_with_mixin_t
&
o
HB_UNUSED
)
{}
};
/* Mixin to fill in what the subclass doesn't provide. */
template
<
typename
iter_t
,
typename
item_t
=
typename
iter_t
::
__item_t__
>
struct
hb_iter_fallback_mixin_t
...
...
@@ -178,6 +165,17 @@ struct hb_iter_fallback_mixin_t
void
operator
=
(
const
hb_iter_fallback_mixin_t
&
o
HB_UNUSED
)
{}
};
template
<
typename
iter_t
,
typename
item_t
=
typename
iter_t
::
__item_t__
>
struct
hb_iter_with_fallback_t
:
hb_iter_t
<
iter_t
,
item_t
>
,
hb_iter_fallback_mixin_t
<
iter_t
,
item_t
>
{
protected:
hb_iter_with_fallback_t
()
{}
hb_iter_with_fallback_t
(
const
hb_iter_with_fallback_t
&
o
HB_UNUSED
)
{}
void
operator
=
(
const
hb_iter_with_fallback_t
&
o
HB_UNUSED
)
{}
};
/*
* Meta-programming predicates.
*/
...
...
@@ -283,9 +281,8 @@ hb_map (Proj&& f)
template
<
typename
Iter
,
typename
Pred
,
typename
Proj
,
hb_enable_if
(
hb_is_iterator
(
Iter
))>
struct
hb_filter_iter_t
:
hb_iter_with_mixin_t
<
hb_iter_fallback_mixin_t
,
hb_filter_iter_t
<
Iter
,
Pred
,
Proj
>
,
typename
Iter
::
item_t
>
hb_iter_with_fallback_t
<
hb_filter_iter_t
<
Iter
,
Pred
,
Proj
>
,
typename
Iter
::
item_t
>
{
hb_filter_iter_t
(
const
Iter
&
it_
,
Pred
&&
p
,
Proj
&&
f
)
:
it
(
it_
),
p
(
p
),
f
(
f
)
{
while
(
it
&&
!
p
(
f
(
*
it
)))
++
it
;
}
...
...
src/hb-ot-layout-common.hh
浏览文件 @
849a0f17
...
...
@@ -1120,10 +1120,7 @@ struct Coverage
}
}
struct
iter_t
:
hb_iter_with_mixin_t
<
hb_iter_fallback_mixin_t
,
iter_t
,
hb_codepoint_t
>
struct
iter_t
:
hb_iter_with_fallback_t
<
iter_t
,
hb_codepoint_t
>
{
static
constexpr
bool
is_sorted_iterator
=
true
;
iter_t
(
const
Coverage
&
c_
=
Null
(
Coverage
))
...
...
src/hb-set.hh
浏览文件 @
849a0f17
...
...
@@ -682,10 +682,7 @@ struct hb_set_t
/*
* Iterator implementation.
*/
struct
iter_t
:
hb_iter_with_mixin_t
<
hb_iter_fallback_mixin_t
,
iter_t
,
hb_codepoint_t
>
struct
iter_t
:
hb_iter_with_fallback_t
<
iter_t
,
hb_codepoint_t
>
{
static
constexpr
bool
is_sorted_iterator
=
true
;
iter_t
(
const
hb_set_t
&
s_
=
Null
(
hb_set_t
))
:
...
...
src/test-iter.cc
浏览文件 @
849a0f17
...
...
@@ -33,10 +33,7 @@
template
<
typename
T
>
struct
array_iter_t
:
hb_iter_with_mixin_t
<
hb_iter_fallback_mixin_t
,
array_iter_t
<
T
>
,
T
&>
struct
array_iter_t
:
hb_iter_with_fallback_t
<
array_iter_t
<
T
>
,
T
&>
{
array_iter_t
(
hb_array_t
<
T
>
arr_
)
:
arr
(
arr_
)
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录