From f23026cce8fa49974e3dd06e00dd073cb45f906b 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/build_vehicle_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/build_vehicle_gui.cpp') diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index d3d6cb02c..86b27a20d 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -27,6 +27,7 @@ #include "settings_type.h" #include "gfx_func.h" #include "widgets/dropdown_func.h" +#include "string_func.h" #include "table/sprites.h" #include "table/strings.h" @@ -1136,7 +1137,7 @@ static void NewVehicleWndProc(Window *w, WindowEvent *e) break; case WE_ON_EDIT_TEXT: { - if (e->we.edittext.str[0] != '\0') { + if (!StrEmpty(e->we.edittext.str)) { StringID str = STR_NULL; _cmd_text = e->we.edittext.str; switch (bv->vehicle_type) { -- cgit v1.2.3-54-g00ecf