diff --git a/esphome/components/api/proto.cpp b/esphome/components/api/proto.cpp index 6348c74c5f..4f16815d1b 100644 --- a/esphome/components/api/proto.cpp +++ b/esphome/components/api/proto.cpp @@ -8,7 +8,7 @@ namespace esphome::api { static const char *const TAG = "api.proto"; -uint32_t ProtoSize::varint_slow_(uint32_t value) { +uint32_t ProtoSize::varint_slow(uint32_t value) { // value is guaranteed >= 128 here (fast path handled inline) if (value < 16384) { return 2; // 14 bits diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index 2ac8dbd844..ec49964035 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -524,10 +524,10 @@ class ProtoSize { return 4; return 5; } - return varint_slow_(value); + return varint_slow(value); } // Slow path for varint >= 128, outlined to keep fast path small - static uint32_t varint_slow_(uint32_t value) __attribute__((noinline)); + static uint32_t varint_slow(uint32_t value) __attribute__((noinline)); /** * @brief Calculates the size in bytes needed to encode a uint64_t value as a varint