From 88bbd87ddd28f45a8b8a983365becfa923174783 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Wed, 9 Feb 2022 10:48:05 +0800 Subject: Revert "Fix the alignment of placement new buffer for GenericValue." --- include/rapidjson/document.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 92794744..e2cc6000 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1235,8 +1235,8 @@ public: // return NullValue; // Use static buffer and placement-new to prevent destruction - static GenericValid buffer; - return *new (reinterpret_cast(&buffer)) GenericValue(); + static char buffer[sizeof(GenericValue)]; + return *new (buffer) GenericValue(); } } template -- cgit v1.2.3