[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:
J. Nick Koston
2026-03-20 21:21:09 -10:00
parent 2067053adb
commit 20d3e7c13a
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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"