Change null-pool specialization to min_size again
This commit is contained in:
parent
25147ff808
commit
f9cfa5cb0e
|
@ -49,19 +49,19 @@ static inline Type const & Null (void) {
|
||||||
}
|
}
|
||||||
#define Null(Type) Null<Type>()
|
#define Null(Type) Null<Type>()
|
||||||
|
|
||||||
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
|
/* Specializaitons for arbitrary-content Null objects expressed in bytes. */
|
||||||
#define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
#define DECLARE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
||||||
} /* Close namespace. */ \
|
} /* Close namespace. */ \
|
||||||
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)]; \
|
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]; \
|
||||||
template <> \
|
template <> \
|
||||||
/*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \
|
/*static*/ inline const Namespace::Type& Null<Namespace::Type> (void) { \
|
||||||
return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
|
return *reinterpret_cast<const Namespace::Type *> (_hb_Null_##Namespace##_##Type); \
|
||||||
} \
|
} \
|
||||||
namespace Namespace { \
|
namespace Namespace { \
|
||||||
static_assert (Namespace::Type::min_size <= sizeof (Type), "Null pool too small. Enlarge."); \
|
static_assert (true, "Just so we take semicolon after.")
|
||||||
|
|
||||||
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
|
||||||
const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)]
|
const unsigned char _hb_Null_##Namespace##_##Type[Namespace::Type::min_size]
|
||||||
|
|
||||||
|
|
||||||
/* Global writable pool. Enlarge as necessary. */
|
/* Global writable pool. Enlarge as necessary. */
|
||||||
|
|
Loading…
Reference in New Issue