From de96e5c81c7f473520df93052ecea162baa5a350 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 1 Nov 2018 18:13:58 -0400 Subject: [PATCH] [Crap] Avoid operator= --- src/hb-null.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-null.hh b/src/hb-null.hh index 3d8a1ae6c..d5b74bf56 100644 --- a/src/hb-null.hh +++ b/src/hb-null.hh @@ -87,7 +87,7 @@ template static inline Type& Crap (void) { static_assert (sizeof (Type) <= HB_NULL_POOL_SIZE, "Increase HB_NULL_POOL_SIZE."); Type *obj = reinterpret_cast (_hb_CrapPool); - *obj = Null(Type); + memcpy (obj, &Null(Type), sizeof (*obj)); return *obj; } #define Crap(Type) Crap::value>::value>()