diff options
author | frosch <frosch@openttd.org> | 2012-09-12 18:50:44 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-09-12 18:50:44 +0000 |
commit | c7a536a6d8486f522a286e259f179f33b1f6711c (patch) | |
tree | 306988857e172e04a711267068ccdeb6c143c0a5 | |
parent | bcf1cb1f9c9daa29cfd7df2eb0640f3f66e41f48 (diff) | |
download | openttd-c7a536a6d8486f522a286e259f179f33b1f6711c.tar.xz |
(svn r24522) -Codechange: Rename _keep_gender_data to _scan_for_gender_data to reflect what it intends to do instead of what it does.
-rw-r--r-- | src/strings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index f14e9123b..b0160f397 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -132,7 +132,7 @@ static char **_langpack_offs; static LanguagePack *_langpack; static uint _langtab_num[TAB_COUNT]; ///< Offset into langpack offs static uint _langtab_start[TAB_COUNT]; ///< Offset into langpack offs -static bool _keep_gender_data = false; ///< Should we retain the gender data in the current string? +static bool _scan_for_gender_data = false; ///< Are we scanning for the gender of the current string? (instead of formatting it) const char *GetStringPtr(StringID string) @@ -879,11 +879,11 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg /* Now do the string formatting. */ char buf[256]; - bool old_kgd = _keep_gender_data; - _keep_gender_data = true; + bool old_sgd = _scan_for_gender_data; + _scan_for_gender_data = true; StringParameters tmp_params(args->GetPointerToOffset(offset), args->num_param - offset, NULL); p = FormatString(buf, input, &tmp_params, lastof(buf)); - _keep_gender_data = old_kgd; + _scan_for_gender_data = old_sgd; *p = '\0'; /* And determine the string. */ @@ -899,7 +899,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg /* This sets up the gender for the string. * We just ignore this one. It's used in {G 0 Der Die Das} to determine the case. */ case SCC_GENDER_INDEX: // {GENDER 0} - if (_keep_gender_data) { + if (_scan_for_gender_data) { buff += Utf8Encode(buff, SCC_GENDER_INDEX); *buff++ = *str++; } else { |