1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: use StrEmpty instead of number of bytes in string to check for empty

This commit is contained in:
Rubidium
2025-01-16 21:04:00 +01:00
committed by rubidium42
parent c5dac6e619
commit f7aaf8ea24
2 changed files with 3 additions and 3 deletions

View File

@@ -2528,7 +2528,7 @@ EventState Window::HandleEditBoxKey(WidgetID wid, char32_t key, uint16_t keycode
break;
case QueryString::ACTION_CLEAR:
if (query->text.bytes <= 1) {
if (StrEmpty(query->text.GetText())) {
/* If already empty, unfocus instead */
this->UnfocusFocusedWidget();
} else {