1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-05 12:52:19 +01:00

Make ProtoSize an object

This commit is contained in:
J. Nick Koston
2025-07-26 14:08:43 -10:00
parent d111b84ca4
commit 1032e5c220
3 changed files with 5 additions and 10 deletions

View File

@@ -1687,7 +1687,7 @@ def build_message_type(
else:
o += "\n"
o += indent("\n".join(encode)) + "\n"
o += "}\n"
o += "}\n"
cpp += o
prot = "void encode(ProtoWriteBuffer buffer) const override;"
public_content.append(prot)
@@ -1703,7 +1703,7 @@ def build_message_type(
# For multiple fields
o += "\n"
o += indent("\n".join(size_calc)) + "\n"
o += "}\n"
o += "}\n"
cpp += o
prot = "void calculate_size(ProtoSize &size) const override;"
public_content.append(prot)