(svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions.

This commit is contained in:
frosch
2012-06-04 15:30:29 +00:00
parent 31eb896143
commit d58eee1e79
14 changed files with 129 additions and 134 deletions

View File

@@ -318,7 +318,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
/* snprintf() always outputs trailing '\0', so whole buffer can be used */
snprintf(this->edit_str_buf, this->edit_str_size, "%u", _settings_newgame.game_creation.generation_seed);
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size);
this->text.Initialize(this->edit_str_buf, this->edit_str_size);
this->caption = STR_NULL;
this->afilter = CS_NUMERAL;
@@ -556,7 +556,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case WID_GL_RANDOM_BUTTON: // Random seed
_settings_newgame.game_creation.generation_seed = InteractiveRandom();
snprintf(this->edit_str_buf, this->edit_str_size, "%u", _settings_newgame.game_creation.generation_seed);
UpdateTextBufferSize(&this->text);
this->text.UpdateSize();
this->SetDirty();
break;