From 2c96ce4506163ad1528db6a4340964af99fc1de2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 10 May 2008 08:58:52 +0000 Subject: (svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL. --- src/industry_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/industry_gui.cpp') diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 5e2c7f652..996210bb9 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -25,6 +25,7 @@ #include "player_func.h" #include "settings_type.h" #include "tilehighlight_func.h" +#include "string_func.h" #include "table/strings.h" #include "table/sprites.h" @@ -592,7 +593,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) break; case WE_ON_EDIT_TEXT: - if (e->we.edittext.str[0] != '\0') { + if (!StrEmpty(e->we.edittext.str)) { Industry* i = GetIndustry(w->window_number); int line = WP(w, indview_d).editbox_line; -- cgit v1.2.3-54-g00ecf