mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
[web_server_base] Reduce sizeof(WebServerBase) by 4 bytes
Change initialized_ from int to uint8_t. This field is a refcount that only reaches 1-2 in practice. The smaller type packs next to port_ (uint16_t), shrinking the first field group from 8 to 4 bytes.
This commit is contained in:
@@ -135,7 +135,7 @@ class WebServerBase {
|
||||
uint16_t get_port() const { return port_; }
|
||||
|
||||
protected:
|
||||
int initialized_{0};
|
||||
uint8_t initialized_{0};
|
||||
uint16_t port_{80};
|
||||
AsyncWebServer *server_{nullptr};
|
||||
std::vector<AsyncWebHandler *> handlers_;
|
||||
|
||||
Reference in New Issue
Block a user