From 2b385403f817804b91eb129c21aec3dfa992bcf6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 28 Oct 2025 15:40:38 -0500 Subject: [PATCH] remove dead code --- esphome/components/api/proto.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index 5733f0dc76..d7084fb7ba 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -7,6 +7,7 @@ #include #include +#include #include #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE @@ -289,11 +290,9 @@ class ProtoWriteBuffer { void encode_varint(uint32_t value) { this->encode_varint(static_cast(value)); } // size_t overload (only enabled if size_t is distinct from uint32_t and uint64_t) - template::value && !std::is_same::value && - !std::is_same::value, - int>::type = 0> - void encode_varint(T value) { + template + requires std::is_same_v && !std::is_same_v && + !std::is_same_v void encode_varint(T value) { this->encode_varint(static_cast(value)); }