[select] Refactor to index-based operations for immediate and future RAM savings (#11623)

This commit is contained in:
J. Nick Koston
2025-11-05 11:33:01 +13:00
committed by GitHub
parent c7ae424613
commit 6f7e54c3f3
44 changed files with 268 additions and 204 deletions
+1 -1
View File
@@ -877,7 +877,7 @@ uint16_t APIConnection::try_send_select_state(EntityBase *entity, APIConnection
bool is_single) {
auto *select = static_cast<select::Select *>(entity);
SelectStateResponse resp;
resp.set_state(StringRef(select->state));
resp.set_state(StringRef(select->current_option()));
resp.missing_state = !select->has_state();
return fill_and_encode_entity_state(select, resp, SelectStateResponse::MESSAGE_TYPE, conn, remaining_size, is_single);
}