From 7f25d3e6d3ec46697c68e16899ac1adc58314b96 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 21 Jul 2025 19:50:01 -1000 Subject: [PATCH] unused --- esphome/components/api/proto.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index 58242495d9..3f11222b19 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -672,20 +672,6 @@ class ProtoSize { // NOTE: sint64 support functions (add_sint64_field, add_sint64_field_repeated) removed // sint64 type is not supported by ESPHome API to reduce overhead on embedded systems - /** - * @brief Calculates and adds the size of a string/bytes field to the total message size - */ - static inline void add_string_field(uint32_t &total_size, uint32_t field_id_size, const std::string &str) { - // Skip calculation if string is empty - if (str.empty()) { - return; // No need to update total_size - } - - // Calculate and directly add to total_size - const uint32_t str_size = static_cast(str.size()); - total_size += field_id_size + varint(str_size) + str_size; - } - /** * @brief Calculates and adds the size of a string field using length */