Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f6c8a6ea
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看板
提交
f6c8a6ea
编写于
5月 18, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Simplify casts
上级
9c42f05a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
12 deletion
+12
-12
src/hb-ot-layout-gdef-private.h
src/hb-ot-layout-gdef-private.h
+1
-1
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+3
-3
src/hb-ot-layout-gsub-private.h
src/hb-ot-layout-gsub-private.h
+3
-3
src/hb-ot-layout-open-private.h
src/hb-ot-layout-open-private.h
+5
-5
未找到文件。
src/hb-ot-layout-gdef-private.h
浏览文件 @
f6c8a6ea
...
...
@@ -110,7 +110,7 @@ struct CaretValueFormat3 {
private:
inline
const
Device
&
get_device
(
void
)
const
{
if
(
HB_UNLIKELY
(
!
deviceTable
))
return
Null
(
Device
);
return
*
(
const
Device
*
)
((
const
char
*
)
this
+
deviceTable
);
return
(
const
Device
&
)
*
((
const
char
*
)
this
+
deviceTable
);
}
inline
int
get_caret_value
(
int
ppem
)
const
{
...
...
src/hb-ot-layout-gpos-private.h
浏览文件 @
f6c8a6ea
...
...
@@ -787,7 +787,7 @@ ASSERT_SIZE (PosLookupSubTable, 2);
struct
PosLookup
:
Lookup
{
inline
const
PosLookupSubTable
&
get_subtable
(
unsigned
int
i
)
const
{
return
*
(
PosLookupSubTable
*
)
&
(((
Lookup
*
)
this
)
->
get_subtable
(
i
)
);
return
(
const
PosLookupSubTable
&
)
Lookup
::
get_subtable
(
i
);
}
/* Like get_type(), but looks through extension lookups.
...
...
@@ -880,7 +880,7 @@ struct GPOS : GSUBGPOS {
/* XXX check version here? */
inline
const
PosLookup
&
get_lookup
(
unsigned
int
i
)
const
{
return
*
(
PosLookup
*
)
&
(((
GSUBGPOS
*
)
this
)
->
get_lookup
(
i
));
return
(
PosLookup
&
)
(((
GSUBGPOS
*
)
this
)
->
get_lookup
(
i
));
}
inline
bool
position_lookup
(
hb_ot_layout_t
*
layout
,
...
...
@@ -902,7 +902,7 @@ inline bool ExtensionPosFormat1::position (LOOKUP_ARGS_DEF) const {
if
(
HB_UNLIKELY
(
lookup_type
==
GPOS_Extension
))
return
false
;
return
(
*
(
PosLookupSubTable
*
)
(((
char
*
)
this
)
+
get_offset
())).
position
(
LOOKUP_ARGS
,
lookup_type
);
return
(
(
PosLookupSubTable
&
)
*
(((
char
*
)
this
)
+
get_offset
())).
position
(
LOOKUP_ARGS
,
lookup_type
);
}
static
inline
bool
position_lookup
(
LOOKUP_ARGS_DEF
,
unsigned
int
lookup_index
)
{
...
...
src/hb-ot-layout-gsub-private.h
浏览文件 @
f6c8a6ea
...
...
@@ -667,7 +667,7 @@ ASSERT_SIZE (SubstLookupSubTable, 2);
struct
SubstLookup
:
Lookup
{
inline
const
SubstLookupSubTable
&
get_subtable
(
unsigned
int
i
)
const
{
return
*
(
SubstLookupSubTable
*
)
&
(((
Lookup
*
)
this
)
->
get_subtable
(
i
)
);
return
(
const
SubstLookupSubTable
&
)
Lookup
::
get_subtable
(
i
);
}
/* Like get_type(), but looks through extension lookups.
...
...
@@ -779,7 +779,7 @@ struct GSUB : GSUBGPOS {
/* XXX check version here? */
inline
const
SubstLookup
&
get_lookup
(
unsigned
int
i
)
const
{
return
*
(
SubstLookup
*
)
&
(((
GSUBGPOS
*
)
this
)
->
get_lookup
(
i
));
return
(
SubstLookup
&
)
(((
GSUBGPOS
*
)
this
)
->
get_lookup
(
i
));
}
inline
bool
substitute_lookup
(
hb_ot_layout_t
*
layout
,
...
...
@@ -801,7 +801,7 @@ inline bool ExtensionSubstFormat1::substitute (LOOKUP_ARGS_DEF) const {
if
(
HB_UNLIKELY
(
lookup_type
==
GSUB_Extension
))
return
false
;
return
(
*
(
SubstLookupSubTable
*
)
(((
char
*
)
this
)
+
get_offset
())).
substitute
(
LOOKUP_ARGS
,
lookup_type
);
return
(
(
SubstLookupSubTable
&
)
*
(((
char
*
)
this
)
+
get_offset
())).
substitute
(
LOOKUP_ARGS
,
lookup_type
);
}
static
inline
bool
substitute_lookup
(
LOOKUP_ARGS_DEF
,
unsigned
int
lookup_index
)
{
...
...
src/hb-ot-layout-open-private.h
浏览文件 @
f6c8a6ea
...
...
@@ -70,7 +70,7 @@
inline const Type& operator[] (unsigned int i) const { \
if (HB_UNLIKELY (i >= num)) return Null(Type); \
if (HB_UNLIKELY (!array[i])) return Null(Type); \
return
*(const Type *)
((const char*)this + array[i]); \
return
(const Type&)*
((const char*)this + array[i]); \
}
...
...
@@ -152,14 +152,14 @@ static const char NullPool[16] = "";
template
<
typename
Type
>
struct
Null
{
ASSERT_STATIC
(
sizeof
(
Type
)
<=
sizeof
(
NullPool
));
static
inline
const
Type
&
get
()
{
return
(
const
Type
&
)
*
(
const
Type
*
)
NullPool
;
}
static
inline
const
Type
&
get
()
{
return
(
const
Type
&
)
*
NullPool
;
}
};
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Type, size, data) \
template <> \
struct Null <Type> { \
static inline const Type &get () { static const char bytes[size] = data; return (const Type&) *
(const Type*) bytes;
} \
static inline const Type &get () { static const char bytes[size] = data; return (const Type&) *
bytes;
/* XXX */
} \
}
/* Accessor macro. */
...
...
@@ -176,10 +176,10 @@ struct Null <Type> { \
#define STATIC_DEFINE_GET_FOR_DATA(Type) \
static inline const Type& get_for_data (const char *data) { \
if (HB_UNLIKELY (data == NULL)) return Null(Type); \
return
*(const Type*)
data; \
return
(const Type&)*
data; \
} \
static inline Type& get_for_data (char *data) { \
return
*(Type*)
data; \
return
(Type&)*
data; \
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录