remove unnecessary PROGMEM empty string from weak default

The weak default is only reached when USE_ENTITY_ICON is disabled,
and get_icon_to() already short-circuits with return "" in that case.
This commit is contained in:
J. Nick Koston
2026-03-03 08:18:18 -10:00
parent 4a22afb79d
commit 8335bb5f8e
+1 -3
View File
@@ -49,9 +49,7 @@ void EntityBase::set_name(const char *name, uint32_t object_id_hash) {
// Weak default lookup functions — overridden by generated code in main.cpp
__attribute__((weak)) const char *entity_device_class_lookup(uint8_t) { return ""; }
__attribute__((weak)) const char *entity_uom_lookup(uint8_t) { return ""; }
// Icon empty string must be PROGMEM — on ESP8266 callers use strncpy_P to read it
static const char ENTITY_ICON_EMPTY[] PROGMEM = "";
__attribute__((weak)) const char *entity_icon_lookup(uint8_t) { return ENTITY_ICON_EMPTY; }
__attribute__((weak)) const char *entity_icon_lookup(uint8_t) { return ""; }
// Entity device class (from index)
StringRef EntityBase::get_device_class_ref() const {