mirror of
https://github.com/esphome/esphome.git
synced 2026-09-27 06:50:22 +00:00
[api] Remove virtual destructor and rename read_message to read_message_
The virtual destructor was unnecessary since APIConnection is only stored as unique_ptr<APIConnection>, never via a base class pointer. Removing it eliminates the vtable entirely. Rename read_message to read_message_ per clang-tidy naming convention for protected methods.
This commit is contained in:
@@ -3055,7 +3055,7 @@ static const char *const TAG = "api.service";
|
||||
# can devirtualize and inline the on_* handler calls within the same class.
|
||||
# APIConnection declares the override in api_connection.h.
|
||||
|
||||
out = "void APIConnection::read_message(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n"
|
||||
out = "void APIConnection::read_message_(uint32_t msg_size, uint32_t msg_type, const uint8_t *msg_data) {\n"
|
||||
|
||||
# Auth check block before dispatch switch
|
||||
out += " // Check authentication/connection requirements\n"
|
||||
|
||||
Reference in New Issue
Block a user