Merge pull request #257 from d-a-v/stringref

use more string references
This commit is contained in:
Lukas Bachschwell 2023-10-14 20:31:01 +02:00 committed by GitHub
commit 85ccff0ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -859,7 +859,7 @@ void ESPUIClass::updateControl(Control* control, int)
NotifyClients(ClientUpdateType_t::UpdateNeeded); NotifyClients(ClientUpdateType_t::UpdateNeeded);
} }
void ESPUIClass::setPanelStyle(uint16_t id, String style, int clientId) void ESPUIClass::setPanelStyle(uint16_t id, const String& style, int clientId)
{ {
Control* control = getControl(id); Control* control = getControl(id);
if (control) if (control)
@ -869,7 +869,7 @@ void ESPUIClass::setPanelStyle(uint16_t id, String style, int clientId)
} }
} }
void ESPUIClass::setElementStyle(uint16_t id, String style, int clientId) void ESPUIClass::setElementStyle(uint16_t id, const String& style, int clientId)
{ {
Control* control = getControl(id); Control* control = getControl(id);
if (control) if (control)
@ -879,7 +879,7 @@ void ESPUIClass::setElementStyle(uint16_t id, String style, int clientId)
} }
} }
void ESPUIClass::setInputType(uint16_t id, String type, int clientId) void ESPUIClass::setInputType(uint16_t id, const String& type, int clientId)
{ {
Control* control = getControl(id); Control* control = getControl(id);
if (control) if (control)

View File

@ -176,9 +176,9 @@ public:
void clearGraph(uint16_t id, int clientId = -1); void clearGraph(uint16_t id, int clientId = -1);
void addGraphPoint(uint16_t id, int nValue, int clientId = -1); void addGraphPoint(uint16_t id, int nValue, int clientId = -1);
void setPanelStyle(uint16_t id, String style, int clientId = -1); void setPanelStyle(uint16_t id, const String& style, int clientId = -1);
void setElementStyle(uint16_t id, String style, int clientId = -1); void setElementStyle(uint16_t id, const String& style, int clientId = -1);
void setInputType(uint16_t id, String type, int clientId = -1); void setInputType(uint16_t id, const String& type, int clientId = -1);
void setPanelWide(uint16_t id, bool wide); void setPanelWide(uint16_t id, bool wide);
void setVertical(uint16_t id, bool vert = true); void setVertical(uint16_t id, bool vert = true);