summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-10 08:58:52 +0000
committerrubidium <rubidium@openttd.org>2008-05-10 08:58:52 +0000
commitf23026cce8fa49974e3dd06e00dd073cb45f906b (patch)
tree746df1921c03a63762ea8a5c0a05a16d672c34fe /src/town_gui.cpp
parente099831210a55f71f7def91d2ee9fb6c3058a1eb (diff)
downloadopenttd-f23026cce8fa49974e3dd06e00dd073cb45f906b.tar.xz
(svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 83a487659..b39cc5b46 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -23,6 +23,7 @@
#include "core/alloc_func.hpp"
#include "settings_type.h"
#include "tilehighlight_func.h"
+#include "string_func.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -360,7 +361,7 @@ static void TownViewWndProc(Window *w, WindowEvent *e)
} break;
case WE_ON_EDIT_TEXT:
- if (e->we.edittext.str[0] != '\0') {
+ if (!StrEmpty(e->we.edittext.str)) {
_cmd_text = e->we.edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN));