提交 7f7b1370 编写于 作者: B Behdad Esfahbod

Fix Uniscribe build

If a pointer type was passed to Null(), reinterpret_cast<> was
complaining about qualifiers being removed. Turns out I need the const on
the other side of "Type" to fix that.  Also remove unused const from
NullPool type.
上级 31c4236d
......@@ -47,7 +47,7 @@
#include <stdio.h>
#ifndef HB_NO_VISIBILITY
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
#endif
......
......@@ -27,7 +27,7 @@
#include "hb-open-type-private.hh"
#ifndef HB_NO_VISIBILITY
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
#endif
......
......@@ -47,7 +47,7 @@
#ifndef HB_NO_VISIBILITY
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
#endif
......
......@@ -550,16 +550,16 @@ static
#else
extern HB_INTERNAL
#endif
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)]
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 inline Type const & Null (void) {
static_assert (sizeof (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
return *reinterpret_cast<const Type *> (_hb_NullPool);
return *reinterpret_cast<Type const *> (_hb_NullPool);
}
#define Null(Type) Null<Type>()
......
......@@ -45,7 +45,7 @@
#if !defined(HB_NO_VISIBILITY) && !defined(HB_SUBSET_BUILTIN)
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
#endif
......
......@@ -38,7 +38,7 @@
using namespace OT;
#ifndef HB_NO_VISIBILITY
const void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册