[Crap] Avoid operator=

This commit is contained in:
Behdad Esfahbod 2018-11-01 18:13:58 -04:00
parent f9353bd68c
commit de96e5c81c
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ template <typename Type>
static inline Type& Crap (void) {
static_assert (sizeof (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE.");
Type *obj = reinterpret_cast<Type *> (_hb_CrapPool);
*obj = Null(Type);
memcpy (obj, &Null(Type), sizeof (*obj));
return *obj;
}
#define Crap(Type) Crap<typename hb_remove_const<typename hb_remove_reference<Type>::value>::value>()