diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index 1db326f..68b1fef 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -531,14 +531,7 @@ uint16_t ESPUIClass::addControl( NotifyClients(ClientUpdateType_t::RebuildNeeded); - if (control == nullptr) - { - return 0; - } - else - { - return control->id; - } + return control->id; } bool ESPUIClass::removeControl(uint16_t id, bool force_rebuild_ui) @@ -667,7 +660,7 @@ uint16_t ESPUIClass::gauge(const char* label, ControlColor color, int number, in uint16_t ESPUIClass::separator(const char* label) { - return addControl(ControlType::Separator, label, "", ControlColor::Alizarin, Control::noParent, nullptr); + return addControl(ControlType::Separator, label, "", ControlColor::Alizarin); } uint16_t ESPUIClass::fileDisplay(const char* label, ControlColor color, String filename)