From 705c28d3a33d606c8c938d079dbf82de7e7a6b7d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 1 Aug 2024 11:56:43 -0700 Subject: [NFC] Avoid a temp local (#6800) The local was only used once, so it didn't really add much. And, it was causing some compilers to error on "unused variable" (when building without assertions, the use was removed). --- src/wasm/literal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 7e4aeb8c7..f2100ea71 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -2702,9 +2702,9 @@ Literal Literal::externalize() const { Literal Literal::internalize() const { auto share = type.getHeapType().getShared(); - auto extType = HeapTypes::ext.getBasic(share); - assert(Type::isSubType(type, Type(extType, Nullable)) && - "can only internalize external references"); + assert( + Type::isSubType(type, Type(HeapTypes::ext.getBasic(share), Nullable)) && + "can only internalize external references"); if (isNull()) { return Literal(std::shared_ptr{}, HeapTypes::none.getBasic(share)); } -- cgit v1.2.3