Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
07e0ca93
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看板
提交
07e0ca93
编写于
9月 13, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bytes] Rename content to arrayZ
上级
dbb764dc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
src/hb-dsalgs.hh
src/hb-dsalgs.hh
+8
-8
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+1
-1
未找到文件。
src/hb-dsalgs.hh
浏览文件 @
07e0ca93
...
@@ -529,18 +529,18 @@ struct hb_array_t
...
@@ -529,18 +529,18 @@ struct hb_array_t
struct
hb_bytes_t
struct
hb_bytes_t
{
{
inline
hb_bytes_t
(
void
)
:
bytes
(
nullptr
),
len
(
0
)
{}
inline
hb_bytes_t
(
void
)
:
arrayZ
(
nullptr
),
len
(
0
)
{}
inline
hb_bytes_t
(
const
char
*
bytes_
,
unsigned
int
len_
)
:
bytes
(
bytes_
),
len
(
len_
)
{}
inline
hb_bytes_t
(
const
char
*
bytes_
,
unsigned
int
len_
)
:
arrayZ
(
bytes_
),
len
(
len_
)
{}
inline
hb_bytes_t
(
const
void
*
bytes_
,
unsigned
int
len_
)
:
bytes
((
const
char
*
)
bytes_
),
len
(
len_
)
{}
inline
hb_bytes_t
(
const
void
*
bytes_
,
unsigned
int
len_
)
:
arrayZ
((
const
char
*
)
bytes_
),
len
(
len_
)
{}
template
<
typename
T
>
template
<
typename
T
>
inline
hb_bytes_t
(
const
T
&
array
)
:
bytes
((
const
char
*
)
array
.
arrayZ
),
len
(
array
.
len
)
{}
inline
hb_bytes_t
(
const
T
&
array
)
:
arrayZ
((
const
char
*
)
array
.
arrayZ
),
len
(
array
.
len
)
{}
inline
void
free
(
void
)
{
::
free
((
void
*
)
bytes
);
bytes
=
nullptr
;
len
=
0
;
}
inline
void
free
(
void
)
{
::
free
((
void
*
)
arrayZ
);
arrayZ
=
nullptr
;
len
=
0
;
}
template
<
typename
Type
>
template
<
typename
Type
>
inline
const
Type
*
as
(
void
)
const
inline
const
Type
*
as
(
void
)
const
{
{
return
unlikely
(
!
bytes
)
?
&
Null
(
Type
)
:
reinterpret_cast
<
const
Type
*>
(
bytes
);
return
unlikely
(
!
arrayZ
)
?
&
Null
(
Type
)
:
reinterpret_cast
<
const
Type
*>
(
arrayZ
);
}
}
inline
int
cmp
(
const
hb_bytes_t
&
a
)
const
inline
int
cmp
(
const
hb_bytes_t
&
a
)
const
...
@@ -548,7 +548,7 @@ struct hb_bytes_t
...
@@ -548,7 +548,7 @@ struct hb_bytes_t
if
(
len
!=
a
.
len
)
if
(
len
!=
a
.
len
)
return
(
int
)
a
.
len
-
(
int
)
len
;
return
(
int
)
a
.
len
-
(
int
)
len
;
return
memcmp
(
a
.
bytes
,
bytes
,
len
);
return
memcmp
(
a
.
arrayZ
,
arrayZ
,
len
);
}
}
static
inline
int
cmp
(
const
void
*
pa
,
const
void
*
pb
)
static
inline
int
cmp
(
const
void
*
pa
,
const
void
*
pb
)
{
{
...
@@ -557,7 +557,7 @@ struct hb_bytes_t
...
@@ -557,7 +557,7 @@ struct hb_bytes_t
return
b
->
cmp
(
*
a
);
return
b
->
cmp
(
*
a
);
}
}
const
char
*
bytes
;
const
char
*
arrayZ
;
unsigned
int
len
;
unsigned
int
len
;
};
};
...
...
src/hb-ot-post-table.hh
浏览文件 @
07e0ca93
...
@@ -143,7 +143,7 @@ struct post
...
@@ -143,7 +143,7 @@ struct post
return
true
;
return
true
;
if
(
buf_len
<=
s
.
len
)
/* What to do with truncation? Returning false for now. */
if
(
buf_len
<=
s
.
len
)
/* What to do with truncation? Returning false for now. */
return
false
;
return
false
;
strncpy
(
buf
,
s
.
bytes
,
s
.
len
);
strncpy
(
buf
,
s
.
arrayZ
,
s
.
len
);
buf
[
s
.
len
]
=
'\0'
;
buf
[
s
.
len
]
=
'\0'
;
return
true
;
return
true
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录