Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5846884f
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看板
提交
5846884f
编写于
6月 03, 2019
作者:
B
Bruce Mitchener
提交者:
Ebrahim Byagowi
6月 03, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: Use nullptr in C++ code. (#1744)
上级
7c14b901
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
9 deletion
+9
-9
src/test-ot-color.cc
src/test-ot-color.cc
+4
-4
test/fuzzing/hb-shape-fuzzer.cc
test/fuzzing/hb-shape-fuzzer.cc
+3
-3
test/fuzzing/hb-subset-fuzzer.cc
test/fuzzing/hb-subset-fuzzer.cc
+1
-1
util/options-subset.cc
util/options-subset.cc
+1
-1
未找到文件。
src/test-ot-color.cc
浏览文件 @
5846884f
...
...
@@ -133,7 +133,7 @@ layered_glyph_dump (hb_face_t *face, cairo_font_face_t *cairo_face, unsigned int
unsigned
glyph_count
=
hb_face_get_glyph_count
(
face
);
for
(
hb_codepoint_t
gid
=
0
;
gid
<
glyph_count
;
++
gid
)
{
unsigned
int
num_layers
=
hb_ot_color_glyph_get_layers
(
face
,
gid
,
0
,
NULL
,
NULL
);
unsigned
int
num_layers
=
hb_ot_color_glyph_get_layers
(
face
,
gid
,
0
,
nullptr
,
nullptr
);
if
(
!
num_layers
)
continue
;
...
...
@@ -169,7 +169,7 @@ layered_glyph_dump (hb_face_t *face, cairo_font_face_t *cairo_face, unsigned int
unsigned
int
palette_count
=
hb_ot_color_palette_get_count
(
face
);
for
(
unsigned
int
palette
=
0
;
palette
<
palette_count
;
palette
++
)
{
unsigned
int
num_colors
=
hb_ot_color_palette_get_colors
(
face
,
palette
,
0
,
NULL
,
NULL
);
unsigned
int
num_colors
=
hb_ot_color_palette_get_colors
(
face
,
palette
,
0
,
nullptr
,
nullptr
);
if
(
!
num_colors
)
continue
;
...
...
@@ -271,14 +271,14 @@ main (int argc, char **argv)
FILE
*
font_name_file
=
fopen
(
"out/.dumped_font_name"
,
"r"
);
if
(
font_name_file
!=
NULL
)
if
(
font_name_file
!=
nullptr
)
{
fprintf
(
stderr
,
"Purge or move ./out folder in order to run a new dump
\n
"
);
exit
(
1
);
}
font_name_file
=
fopen
(
"out/.dumped_font_name"
,
"w"
);
if
(
font_name_file
==
NULL
)
if
(
font_name_file
==
nullptr
)
{
fprintf
(
stderr
,
"./out is not accessible as a folder, create it please
\n
"
);
exit
(
1
);
...
...
test/fuzzing/hb-shape-fuzzer.cc
浏览文件 @
5846884f
...
...
@@ -10,7 +10,7 @@
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
hb_blob_t
*
blob
=
hb_blob_create
((
const
char
*
)
data
,
size
,
HB_MEMORY_MODE_READONLY
,
NULL
,
NULL
);
HB_MEMORY_MODE_READONLY
,
nullptr
,
nullptr
);
hb_face_t
*
face
=
hb_face_create
(
blob
,
0
);
hb_font_t
*
font
=
hb_font_create
(
face
);
hb_ot_font_set_funcs
(
font
);
...
...
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
hb_buffer_t
*
buffer
=
hb_buffer_create
();
hb_buffer_add_utf8
(
buffer
,
text
,
-
1
,
0
,
-
1
);
hb_buffer_guess_segment_properties
(
buffer
);
hb_shape
(
font
,
buffer
,
NULL
,
0
);
hb_shape
(
font
,
buffer
,
nullptr
,
0
);
hb_buffer_destroy
(
buffer
);
}
...
...
@@ -34,7 +34,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
hb_buffer_t
*
buffer
=
hb_buffer_create
();
hb_buffer_add_utf32
(
buffer
,
text32
,
sizeof
(
text32
)
/
sizeof
(
text32
[
0
]),
0
,
-
1
);
hb_buffer_guess_segment_properties
(
buffer
);
hb_shape
(
font
,
buffer
,
NULL
,
0
);
hb_shape
(
font
,
buffer
,
nullptr
,
0
);
hb_buffer_destroy
(
buffer
);
/* Misc calls on face. */
...
...
test/fuzzing/hb-subset-fuzzer.cc
浏览文件 @
5846884f
...
...
@@ -53,7 +53,7 @@ trySubset (hb_face_t *face,
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
hb_blob_t
*
blob
=
hb_blob_create
((
const
char
*
)
data
,
size
,
HB_MEMORY_MODE_READONLY
,
NULL
,
NULL
);
HB_MEMORY_MODE_READONLY
,
nullptr
,
nullptr
);
hb_face_t
*
face
=
hb_face_create
(
blob
,
0
);
/* Just test this API here quickly. */
...
...
util/options-subset.cc
浏览文件 @
5846884f
...
...
@@ -115,7 +115,7 @@ parse_drop_tables (const char *name,
else
hb_set_del
(
drop_tables
,
tag
);
s
=
strtok
(
NULL
,
", "
);
s
=
strtok
(
nullptr
,
", "
);
}
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录