Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9da552dc
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看板
提交
9da552dc
编写于
6月 27, 2014
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor: Remove some GenericXXX templates
上级
36073ede
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
24 deletion
+14
-24
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+11
-21
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+2
-2
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+1
-1
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
9da552dc
...
...
@@ -692,8 +692,8 @@ struct FixedVersion
* Use: (base+offset)
*/
template
<
typename
Type
,
typename
OffsetType
=
Offset
>
struct
OffsetTo
:
OffsetType
template
<
typename
Type
,
typename
OffsetType
=
USHORT
>
struct
OffsetTo
:
GenericOffset
<
OffsetType
>
{
inline
const
Type
&
operator
()
(
const
void
*
base
)
const
{
...
...
@@ -737,16 +737,14 @@ static inline const Type& operator + (const Base &base, const OffsetTo<Type, Off
template
<
typename
Base
,
typename
OffsetType
,
typename
Type
>
static
inline
Type
&
operator
+
(
Base
&
base
,
OffsetTo
<
Type
,
OffsetType
>
&
offset
)
{
return
offset
(
base
);
}
template
<
typename
Type
>
struct
LongOffsetTo
:
OffsetTo
<
Type
,
LongOffset
>
{};
/*
* Array Types
*/
template
<
typename
Type
,
typename
LenType
>
struct
GenericArrayOf
/* An array with a number of elements. */
template
<
typename
Type
,
typename
LenType
=
USHORT
>
struct
ArrayOf
{
const
Type
*
sub_array
(
unsigned
int
start_offset
,
unsigned
int
*
pcount
/* IN/OUT */
)
const
{
...
...
@@ -852,13 +850,9 @@ struct GenericArrayOf
DEFINE_SIZE_ARRAY
(
sizeof
(
LenType
),
array
);
};
/* An array with a USHORT number of elements. */
template
<
typename
Type
>
struct
ArrayOf
:
GenericArrayOf
<
Type
,
USHORT
>
{};
/* An array with a ULONG number of elements. */
template
<
typename
Type
>
struct
LongArrayOf
:
Generic
ArrayOf
<
Type
,
ULONG
>
{};
struct
LongArrayOf
:
ArrayOf
<
Type
,
ULONG
>
{};
/* Array of Offset's */
template
<
typename
Type
>
...
...
@@ -866,11 +860,11 @@ struct OffsetArrayOf : ArrayOf<OffsetTo<Type> > {};
/* Array of LongOffset's */
template
<
typename
Type
>
struct
LongOffsetArrayOf
:
ArrayOf
<
LongOffsetTo
<
Type
>
>
{};
struct
LongOffsetArrayOf
:
ArrayOf
<
OffsetTo
<
Type
,
ULONG
>
>
{};
/* LongArray of LongOffset's */
template
<
typename
Type
>
struct
LongOffsetLongArrayOf
:
LongArrayOf
<
LongOffsetTo
<
Type
>
>
{};
struct
LongOffsetLongArrayOf
:
LongArrayOf
<
OffsetTo
<
Type
,
ULONG
>
>
{};
/* Array of offsets relative to the beginning of the array itself. */
template
<
typename
Type
>
...
...
@@ -951,8 +945,8 @@ struct HeadlessArrayOf
/* An array with sorted elements. Supports binary searching. */
template
<
typename
Type
,
typename
LenType
>
struct
GenericSortedArrayOf
:
Generic
ArrayOf
<
Type
,
LenType
>
template
<
typename
Type
,
typename
LenType
=
USHORT
>
struct
SortedArrayOf
:
ArrayOf
<
Type
,
LenType
>
{
template
<
typename
SearchType
>
inline
int
bsearch
(
const
SearchType
&
x
)
const
...
...
@@ -974,13 +968,9 @@ struct GenericSortedArrayOf : GenericArrayOf<Type, LenType>
}
};
/* A sorted array with a USHORT number of elements. */
template
<
typename
Type
>
struct
SortedArrayOf
:
GenericSortedArrayOf
<
Type
,
USHORT
>
{};
/* A sorted array with a ULONG number of elements. */
template
<
typename
Type
>
struct
LongSortedArrayOf
:
Generic
SortedArrayOf
<
Type
,
ULONG
>
{};
struct
LongSortedArrayOf
:
SortedArrayOf
<
Type
,
ULONG
>
{};
}
/* namespace OT */
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
9da552dc
...
...
@@ -229,7 +229,7 @@ struct CmapSubtableTrimmed
UINT
length
;
/* Byte length of this subtable. */
UINT
language
;
/* Ignore. */
UINT
startCharCode
;
/* First character code covered. */
Generic
ArrayOf
<
GlyphID
,
UINT
>
ArrayOf
<
GlyphID
,
UINT
>
glyphIdArray
;
/* Array of glyph index values for character
* codes in the range. */
public:
...
...
@@ -350,7 +350,7 @@ struct EncodingRecord
USHORT
platformID
;
/* Platform ID. */
USHORT
encodingID
;
/* Platform-specific encoding ID. */
LongOffsetTo
<
CmapSubtable
>
OffsetTo
<
CmapSubtable
,
ULONG
>
subtable
;
/* Byte offset from beginning of table to the subtable for this encoding. */
public:
DEFINE_SIZE_STATIC
(
8
);
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
9da552dc
...
...
@@ -506,7 +506,7 @@ struct Feature
if
(
unlikely
(
!
featureParams
.
sanitize
(
c
,
this
,
closure
?
closure
->
tag
:
HB_TAG_NONE
)))
return
TRACE_RETURN
(
false
);
if
(
likely
(
!
orig_offset
))
if
(
likely
(
orig_offset
.
is_null
()
))
return
TRACE_RETURN
(
true
);
if
(
featureParams
==
0
&&
closure
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录