diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index a5fd5c67b2..936e732af1 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -132,6 +132,9 @@ class ProtoVarInt { uint64_t value_; }; +// Forward declaration for decode_to_message and encode_to_writer +class ProtoMessage; + class ProtoLengthDelimited { public: explicit ProtoLengthDelimited(const uint8_t *value, size_t length) : value_(value), length_(length) {} @@ -189,9 +192,6 @@ class Proto64Bit { const uint64_t value_; }; -// Forward declaration needed for method declaration -class ProtoMessage; - class ProtoWriteBuffer { public: ProtoWriteBuffer(std::vector *buffer) : buffer_(buffer) {}