Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
a18280a8
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看板
提交
a18280a8
编写于
6月 07, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix warnings produced by clang analyzer
上级
7ec83051
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
6 deletion
+8
-6
src/hb-icu.cc
src/hb-icu.cc
+4
-2
test/api/test-blob.c
test/api/test-blob.c
+1
-1
test/api/test-buffer.c
test/api/test-buffer.c
+2
-2
util/helper-cairo.cc
util/helper-cairo.cc
+1
-1
未找到文件。
src/hb-icu.cc
浏览文件 @
a18280a8
...
@@ -255,13 +255,15 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
...
@@ -255,13 +255,15 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
else
{
}
else
{
/* If decomposed to more than two characters, take the last one,
/* If decomposed to more than two characters, take the last one,
* and recompose the rest to get the first component. */
* and recompose the rest to get the first component. */
U16_PREV_UNSAFE
(
normalized
,
len
,
*
b
);
U16_PREV_UNSAFE
(
normalized
,
len
,
*
b
);
/* Changes len in-place. */
UChar
recomposed
[
20
];
UChar
recomposed
[
18
*
2
];
icu_err
=
U_ZERO_ERROR
;
icu_err
=
U_ZERO_ERROR
;
len
=
unorm_normalize
(
normalized
,
len
,
UNORM_NFC
,
0
,
recomposed
,
ARRAY_LENGTH
(
recomposed
),
&
icu_err
);
len
=
unorm_normalize
(
normalized
,
len
,
UNORM_NFC
,
0
,
recomposed
,
ARRAY_LENGTH
(
recomposed
),
&
icu_err
);
if
(
U_FAILURE
(
icu_err
))
if
(
U_FAILURE
(
icu_err
))
return
false
;
return
false
;
/* We expect that recomposed has exactly one character now. */
/* We expect that recomposed has exactly one character now. */
if
(
unlikely
(
u_countChar32
(
recomposed
,
len
)
!=
1
))
return
false
;
U16_GET_UNSAFE
(
recomposed
,
0
,
*
a
);
U16_GET_UNSAFE
(
recomposed
,
0
,
*
a
);
ret
=
true
;
ret
=
true
;
}
}
...
...
test/api/test-blob.c
浏览文件 @
a18280a8
...
@@ -68,7 +68,7 @@ test_blob_empty (void)
...
@@ -68,7 +68,7 @@ test_blob_empty (void)
g_assert_cmpint
(
len
,
==
,
0
);
g_assert_cmpint
(
len
,
==
,
0
);
data_writable
=
hb_blob_get_data_writable
(
blob
,
NULL
);
data_writable
=
hb_blob_get_data_writable
(
blob
,
NULL
);
g_assert
(
data
==
NULL
);
g_assert
(
data
_writable
==
NULL
);
data_writable
=
hb_blob_get_data_writable
(
blob
,
&
len
);
data_writable
=
hb_blob_get_data_writable
(
blob
,
&
len
);
g_assert
(
data_writable
==
NULL
);
g_assert
(
data_writable
==
NULL
);
...
...
test/api/test-buffer.c
浏览文件 @
a18280a8
...
@@ -152,7 +152,7 @@ test_buffer_contents (fixture_t *fixture, gconstpointer user_data)
...
@@ -152,7 +152,7 @@ test_buffer_contents (fixture_t *fixture, gconstpointer user_data)
}
}
len
=
hb_buffer_get_length
(
b
);
len
=
hb_buffer_get_length
(
b
);
glyphs
=
hb_buffer_get_glyph_infos
(
b
,
NULL
);
/* test NULL */
hb_buffer_get_glyph_infos
(
b
,
NULL
);
/* test NULL */
glyphs
=
hb_buffer_get_glyph_infos
(
b
,
&
len2
);
glyphs
=
hb_buffer_get_glyph_infos
(
b
,
&
len2
);
g_assert_cmpint
(
len
,
==
,
len2
);
g_assert_cmpint
(
len
,
==
,
len2
);
g_assert_cmpint
(
len
,
==
,
5
);
g_assert_cmpint
(
len
,
==
,
5
);
...
@@ -264,7 +264,7 @@ test_buffer_positions (fixture_t *fixture, gconstpointer user_data)
...
@@ -264,7 +264,7 @@ test_buffer_positions (fixture_t *fixture, gconstpointer user_data)
/* Without shaping, positions should all be zero */
/* Without shaping, positions should all be zero */
len
=
hb_buffer_get_length
(
b
);
len
=
hb_buffer_get_length
(
b
);
positions
=
hb_buffer_get_glyph_positions
(
b
,
NULL
);
/* test NULL */
hb_buffer_get_glyph_positions
(
b
,
NULL
);
/* test NULL */
positions
=
hb_buffer_get_glyph_positions
(
b
,
&
len2
);
positions
=
hb_buffer_get_glyph_positions
(
b
,
&
len2
);
g_assert_cmpint
(
len
,
==
,
len2
);
g_assert_cmpint
(
len
,
==
,
len2
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
...
...
util/helper-cairo.cc
浏览文件 @
a18280a8
...
@@ -416,7 +416,7 @@ helper_cairo_line_from_buffer (helper_cairo_line_t *l,
...
@@ -416,7 +416,7 @@ helper_cairo_line_from_buffer (helper_cairo_line_t *l,
hb_bool_t
backward
=
HB_DIRECTION_IS_BACKWARD
(
hb_buffer_get_direction
(
buffer
));
hb_bool_t
backward
=
HB_DIRECTION_IS_BACKWARD
(
hb_buffer_get_direction
(
buffer
));
l
->
cluster_flags
=
backward
?
CAIRO_TEXT_CLUSTER_FLAG_BACKWARD
:
(
cairo_text_cluster_flags_t
)
0
;
l
->
cluster_flags
=
backward
?
CAIRO_TEXT_CLUSTER_FLAG_BACKWARD
:
(
cairo_text_cluster_flags_t
)
0
;
unsigned
int
cluster
=
0
;
unsigned
int
cluster
=
0
;
const
char
*
start
=
l
->
utf8
,
*
end
=
start
;
const
char
*
start
=
l
->
utf8
,
*
end
;
l
->
clusters
[
cluster
].
num_glyphs
++
;
l
->
clusters
[
cluster
].
num_glyphs
++
;
if
(
backward
)
{
if
(
backward
)
{
for
(
i
=
l
->
num_glyphs
-
2
;
i
>=
0
;
i
--
)
{
for
(
i
=
l
->
num_glyphs
-
2
;
i
>=
0
;
i
--
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录