Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
305d2fbf
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看板
提交
305d2fbf
编写于
10月 21, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add HB_FALLTHROUGH
Borrowed from
https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
上级
6486e375
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
3 deletion
+35
-3
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+1
-1
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape-complex-thai.cc
+1
-1
src/hb-ot-shape-fallback.cc
src/hb-ot-shape-fallback.cc
+3
-1
src/hb-private.hh
src/hb-private.hh
+30
-0
未找到文件。
src/hb-ot-shape-complex-indic.cc
浏览文件 @
305d2fbf
...
@@ -756,7 +756,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
...
@@ -756,7 +756,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
{
{
default:
default:
assert
(
false
);
assert
(
false
);
/* fallthrough */
HB_FALLTHROUGH
;
case
BASE_POS_LAST
:
case
BASE_POS_LAST
:
{
{
...
...
src/hb-ot-shape-complex-thai.cc
浏览文件 @
305d2fbf
...
@@ -139,7 +139,7 @@ thai_pua_shape (hb_codepoint_t u, thai_action_t action, hb_font_t *font)
...
@@ -139,7 +139,7 @@ thai_pua_shape (hb_codepoint_t u, thai_action_t action, hb_font_t *font)
};
};
switch
(
action
)
{
switch
(
action
)
{
default:
assert
(
false
);
/* Fallthrough */
default:
assert
(
false
);
HB_FALLTHROUGH
;
case
NOP
:
return
u
;
case
NOP
:
return
u
;
case
SD
:
pua_mappings
=
SD_mappings
;
break
;
case
SD
:
pua_mappings
=
SD_mappings
;
break
;
case
SDL
:
pua_mappings
=
SDL_mappings
;
break
;
case
SDL
:
pua_mappings
=
SDL_mappings
;
break
;
...
...
src/hb-ot-shape-fallback.cc
浏览文件 @
305d2fbf
...
@@ -224,7 +224,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
...
@@ -224,7 +224,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
pos
.
x_offset
+=
base_extents
.
x_bearing
+
base_extents
.
width
-
mark_extents
.
width
/
2
-
mark_extents
.
x_bearing
;
pos
.
x_offset
+=
base_extents
.
x_bearing
+
base_extents
.
width
-
mark_extents
.
width
/
2
-
mark_extents
.
x_bearing
;
break
;
break
;
}
}
/* Fall through */
HB_FALLTHROUGH
;
default:
default:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
:
...
@@ -259,6 +259,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
...
@@ -259,6 +259,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
case
HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT
:
case
HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT
:
/* Add gap, fall-through. */
/* Add gap, fall-through. */
base_extents
.
height
-=
y_gap
;
base_extents
.
height
-=
y_gap
;
HB_FALLTHROUGH
;
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
:
...
@@ -279,6 +280,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
...
@@ -279,6 +280,7 @@ position_mark (const hb_ot_shape_plan_t *plan,
/* Add gap, fall-through. */
/* Add gap, fall-through. */
base_extents
.
y_bearing
+=
y_gap
;
base_extents
.
y_bearing
+=
y_gap
;
base_extents
.
height
-=
y_gap
;
base_extents
.
height
-=
y_gap
;
HB_FALLTHROUGH
;
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT
:
case
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT
:
...
...
src/hb-private.hh
浏览文件 @
305d2fbf
...
@@ -119,6 +119,36 @@ extern "C" void hb_free_impl(void *ptr);
...
@@ -119,6 +119,36 @@ extern "C" void hb_free_impl(void *ptr);
#define HB_FUNC __func__
#define HB_FUNC __func__
#endif
#endif
/*
* Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
* HB_FALLTHROUGH is an annotation to suppress compiler warnings about switch
* cases that fall through without a break or return statement. HB_FALLTHROUGH
* is only needed on cases that have code:
*
* switch (foo) {
* case 1: // These cases have no code. No fallthrough annotations are needed.
* case 2:
* case 3:
* foo = 4; // This case has code, so a fallthrough annotation is needed:
* HB_FALLTHROUGH;
* default:
* return foo;
* }
*/
#if defined(__clang__) && __cplusplus >= 201103L
/* clang's fallthrough annotations are only available starting in C++11. */
# define HB_FALLTHROUGH [[clang::fallthrough]]
#elif defined(_MSC_VER)
/*
* MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
* https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
*/
# include <sal.h>
# define HB_FALLTHROUGH __fallthrough
#else
# define HB_FALLTHROUGH
/* FALLTHROUGH */
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(_WIN32) || defined(__CYGWIN__)
/* We need Windows Vista for both Uniscribe backend and for
/* We need Windows Vista for both Uniscribe backend and for
* MemoryBarrier. We don't support compiling on Windows XP,
* MemoryBarrier. We don't support compiling on Windows XP,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录