Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
673b764d
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
673b764d
编写于
5月 23, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move code around
上级
65aeabd6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
49 addition
and
42 deletion
+49
-42
src/hb-private.hh
src/hb-private.hh
+49
-42
未找到文件。
src/hb-private.hh
浏览文件 @
673b764d
...
...
@@ -315,7 +315,7 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
/*
Misc
*/
/*
Tiny functions
*/
/*
* Void!
...
...
@@ -522,6 +522,54 @@ _hb_ceil_to_4 (unsigned int v)
/*
*
* Utility types
*
*/
/*
* Null objects
*/
/* Global nul-content Null pool. Enlarge as necessary. */
#define HB_NULL_POOL_SIZE 264
static_assert
(
HB_NULL_POOL_SIZE
%
sizeof
(
void
*
)
==
0
,
"Align HB_NULL_POOL_SIZE."
);
#ifdef HB_NO_VISIBILITY
static
#else
extern
HB_INTERNAL
#endif
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* Generic nul-content Null objects. */
template
<
typename
Type
>
static
inline
const
Type
&
Null
(
void
)
{
static_assert
(
sizeof
(
Type
)
<=
HB_NULL_POOL_SIZE
,
"Increase HB_NULL_POOL_SIZE."
);
return
*
reinterpret_cast
<
const
Type
*>
(
_hb_NullPool
);
}
#define Null(Type) Null<Type>()
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Namespace, Type, data) \
}
/* Close namespace. */
\
static const char _Null##Type[sizeof (Namespace::Type) + 1] = data;
/* +1 is for nul-termination in data */
\
template <> \
/*static*/
inline const Namespace::Type& Null<Namespace::Type> (void) { \
return *reinterpret_cast<const Namespace::Type *> (_Null##Type); \
} \
namespace Namespace { \
/* The following line really exists such that we end in a place needing semicolon */
\
static_assert (Namespace::Type::min_size + 1 <= sizeof (_Null##Type), "Null pool too small. Enlarge.")
/* arrays and maps */
...
...
@@ -1116,46 +1164,5 @@ round (double x)
#endif
/*
* Null objects
*/
/* Global nul-content Null pool. Enlarge as necessary. */
#define HB_NULL_POOL_SIZE 264
static_assert
(
HB_NULL_POOL_SIZE
%
sizeof
(
void
*
)
==
0
,
"Align HB_NULL_POOL_SIZE."
);
#ifdef HB_NO_VISIBILITY
static
#else
extern
HB_INTERNAL
#endif
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* Generic nul-content Null objects. */
template
<
typename
Type
>
static
inline
const
Type
&
Null
(
void
)
{
static_assert
(
sizeof
(
Type
)
<=
HB_NULL_POOL_SIZE
,
"Increase HB_NULL_POOL_SIZE."
);
return
*
reinterpret_cast
<
const
Type
*>
(
_hb_NullPool
);
}
#define Null(Type) Null<Type>()
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Namespace, Type, data) \
}
/* Close namespace. */
\
static const char _Null##Type[sizeof (Namespace::Type) + 1] = data;
/* +1 is for nul-termination in data */
\
template <> \
/*static*/
inline const Namespace::Type& Null<Namespace::Type> (void) { \
return *reinterpret_cast<const Namespace::Type *> (_Null##Type); \
} \
namespace Namespace { \
/* The following line really exists such that we end in a place needing semicolon */
\
static_assert (Namespace::Type::min_size + 1 <= sizeof (_Null##Type), "Null pool too small. Enlarge.")
#endif
/* HB_PRIVATE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录