From b7a1236baefe271c3038cf992dcc66a699cdb942 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 14 Nov 2023 20:19:25 -0600 Subject: [PATCH] [ox/model] Fix MSVC warning --- deps/ox/src/ox/model/descwrite.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/model/descwrite.hpp b/deps/ox/src/ox/model/descwrite.hpp index 0ea3cb08..7ed0ddc4 100644 --- a/deps/ox/src/ox/model/descwrite.hpp +++ b/deps/ox/src/ox/model/descwrite.hpp @@ -363,8 +363,8 @@ constexpr Result buildTypeDef(TypeStore *typeStore) noexcept { oxReturnError(model(&handler, t)); a.deallocate(t, 1); } else { - T *t = reinterpret_cast(ox_alloca(sizeof(T))); - oxReturnError(model(&handler, t)); + auto t = ox_malloca(sizeof(T), T); + oxReturnError(model(&handler, t.get())); } return writer.definition(); }