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.
This commit is contained in:
parent
31c4236d96
commit
7f7b1370d3
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue