mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
a5bd718fc9c00717c93e2dcc7443bbbf4af6ff09
decode() is never called polymorphically - all call sites in read_message_() use concrete types. The only indirect call site was decode_to_message(), which also always knows the concrete type. Convert decode_to_message() to a template so the concrete type is preserved, allowing decode() to be non-virtual. The two classes that override decode() (ExecuteServiceArgument, ExecuteServiceRequest) now hide the base method, which works since all calls use concrete types. This removes one vtable slot (4 bytes) from each decodable message class vtable, saving ~148 bytes of flash.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
