From fcd2af4643b4a68e175243f31cc88cea26f2bf4e Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 21 Oct 2006 22:50:57 +0000 Subject: (svn r6879) -Codechange: Remove the superflouos argument CharsetFilter parameter from HandleEditBoxKey as the same information is present in querystr_d->afilter -Also (&((querystr_d *)&WP(w, querystr_d))->text is the same as &WP(w, querystr_d).text --- genworld_gui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'genworld_gui.c') diff --git a/genworld_gui.c b/genworld_gui.c index 36f7473a5..304540fc6 100644 --- a/genworld_gui.c +++ b/genworld_gui.c @@ -321,7 +321,7 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e) case 16: // Random seed _patches_newgame.generation_seed = InteractiveRandom(); ttd_strlcpy(_edit_str_buf, str_fmt("%u", _patches_newgame.generation_seed), lengthof(_edit_str_buf)); - UpdateTextBufferSize(&((querystr_d *)&WP(w, querystr_d))->text); + UpdateTextBufferSize(&WP(w, querystr_d).text); SetWindowDirty(w); break; case 17: // Generate @@ -395,7 +395,7 @@ void GenerateLandscapeWndProc(Window *w, WindowEvent *e) break; case WE_KEYPRESS: - HandleEditBoxKey(w, &WP(w, querystr_d), SEED_EDIT, e, CS_NUMERAL); + HandleEditBoxKey(w, &WP(w, querystr_d), SEED_EDIT, e); /* the seed is unsigned, therefore atoi cannot be used. * As 2^32 - 1 (MAX_UVALUE(uint32)) is a 'magic' value * (use random seed) it should not be possible to be @@ -518,6 +518,7 @@ static void _ShowGenerateLandscape(glwp_modes mode) querystr->text.maxwidth = 120; querystr->text.buf = _edit_str_buf; querystr->caption = STR_NULL; + querystr->afilter = CS_NUMERAL; UpdateTextBufferSize(&querystr->text); InvalidateWindow(WC_GENERATE_LANDSCAPE, mode); -- cgit v1.2.3-54-g00ecf