mirror of
https://github.com/esphome/esphome.git
synced 2026-09-29 16:00:23 +00:00
Drop template wrapper, call register_component_ directly
The template wrapper caused the compiler to make different optimization decisions on setup(), negating the savings. Calling register_component_ directly was -4 bytes. Co-Authored-By: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
d2af639e71
commit
9967fc54d5
@@ -16,10 +16,10 @@ void setup() {
|
||||
auto *log = new logger::Logger(115200); // NOLINT
|
||||
log->pre_setup();
|
||||
log->set_uart_selection(logger::UART_SELECTION_UART0);
|
||||
App.register_component(log);
|
||||
App.register_component_(log);
|
||||
|
||||
auto *wifi = new wifi::WiFiComponent(); // NOLINT
|
||||
App.register_component(wifi);
|
||||
App.register_component_(wifi);
|
||||
wifi::WiFiAP ap;
|
||||
ap.set_ssid("Test SSID");
|
||||
ap.set_password("password1");
|
||||
|
||||
Reference in New Issue
Block a user