[api] Add explicit static_cast<uint32_t> in decode_zigzag32 calls

On BLE builds where proto_varint_value_t is uint64_t, decode_zigzag32()
takes uint32_t — make the narrowing explicit to match the static_cast
pattern used for other type conversions in generated code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
J. Nick Koston
2026-03-08 21:04:55 -10:00
co-authored by Claude Opus 4.6
parent 6a0539b3d6
commit 972d0978bd
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1262,7 +1262,7 @@ class SFixed64Type(TypeInfo):
class SInt32Type(TypeInfo):
cpp_type = "int32_t"
default_value = "0"
decode_varint = "decode_zigzag32(value)"
decode_varint = "decode_zigzag32(static_cast<uint32_t>(value))"
encode_func = "encode_sint32"
wire_type = WireType.VARINT # Uses wire type 0