This commit is contained in:
J. Nick Koston
2026-03-03 21:35:11 -10:00
parent 3548911b07
commit 765075b1d0
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -280,6 +280,9 @@ class TypeInfo(ABC):
"""
field_id_size = self.calculate_field_id_size()
method = f"calc_{base_method}_force" if force else f"calc_{base_method}"
# calc_bool_force only takes field_id_size (no value needed - bool is always 1 byte)
if base_method == "bool" and force:
return f"size += ProtoSize::{method}({field_id_size});"
value = value_expr or name
return f"size += ProtoSize::{method}({field_id_size}, {value});"