(svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL.

This commit is contained in:
rubidium
2008-05-10 08:58:52 +00:00
parent e099831210
commit f23026cce8
12 changed files with 32 additions and 21 deletions

View File

@@ -979,6 +979,7 @@ static void SelectPlayerFaceWndProc(Window *w, WindowEvent *e)
break;
case WE_ON_EDIT_TEXT:
if (e->we.edittext.str == NULL) break;
/* Set a new player face number */
if (!StrEmpty(e->we.edittext.str)) {
*pf = strtoul(e->we.edittext.str, NULL, 10);
@@ -1331,7 +1332,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
break;
case WE_ON_EDIT_TEXT:
if (StrEmpty(e->we.edittext.str)) return;
if (StrEmpty(e->we.edittext.str)) break;
_cmd_text = e->we.edittext.str;
switch (WP(w, def_d).byte_1) {