From 298184d58fcc420745ae22560ed8cef65af415ee Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 8 May 2026 22:28:11 -0500 Subject: [PATCH] Fix build warning --- src/model/include/ox/model/descwrite.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/model/include/ox/model/descwrite.hpp b/src/model/include/ox/model/descwrite.hpp index 52057be24..12d6729bc 100644 --- a/src/model/include/ox/model/descwrite.hpp +++ b/src/model/include/ox/model/descwrite.hpp @@ -285,9 +285,10 @@ constexpr const DescriptorType *TypeDescWriter::type(Integer_c auto const *val) constexpr auto PT = isSigned ? PrimitiveType::SignedInteger : PrimitiveType::UnsignedInteger; - constexpr auto Bytes = sizeof(*val); - return getType([val] { - switch (sizeof(*val)) { + constexpr auto sz = sizeof(*val); + constexpr auto bytes = sizeof(*val); + return getType([] { + switch (sz) { case 1: return isSigned ? types::Int8 : types::Uint8; case 2: @@ -298,7 +299,7 @@ constexpr const DescriptorType *TypeDescWriter::type(Integer_c auto const *val) return isSigned ? types::Int64 : types::Uint64; } return types::Int32; - }(), 0, PT, Bytes); + }(), 0, PT, bytes); } constexpr const DescriptorType *TypeDescWriter::type(const bool*) const noexcept {