mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r23563) -Cleanup: remove useless global variable from strgen; it would always be false at the point it would be read
This commit is contained in:
parent
ed816477ec
commit
719b4707dc
|
@ -45,7 +45,6 @@ struct Case {
|
||||||
Case *next;
|
Case *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool _masterlang; ///< Whether we are loading the master language
|
|
||||||
static bool _translated; ///< Whether the current language is not the master language
|
static bool _translated; ///< Whether the current language is not the master language
|
||||||
static bool _translation; ///< Is the current file actually a translation or not
|
static bool _translation; ///< Is the current file actually a translation or not
|
||||||
static const char *_file = "(unknown file)"; ///< The filename of the input, so we can refer to it in errors/warnings
|
static const char *_file = "(unknown file)"; ///< The filename of the input, so we can refer to it in errors/warnings
|
||||||
|
@ -1112,7 +1111,7 @@ static void WriteLangfile(const char *filename)
|
||||||
cmdp = ls->english;
|
cmdp = ls->english;
|
||||||
}
|
}
|
||||||
|
|
||||||
_translated = _masterlang || (cmdp != ls->english);
|
_translated = cmdp != ls->english;
|
||||||
|
|
||||||
if (casep != NULL) {
|
if (casep != NULL) {
|
||||||
const Case *c;
|
const Case *c;
|
||||||
|
@ -1323,7 +1322,6 @@ int CDECL main(int argc, char *argv[])
|
||||||
mkpath(pathbuf, lengthof(pathbuf), src_dir, "english.txt");
|
mkpath(pathbuf, lengthof(pathbuf), src_dir, "english.txt");
|
||||||
|
|
||||||
/* parse master file */
|
/* parse master file */
|
||||||
_masterlang = true;
|
|
||||||
ParseFile(pathbuf, true);
|
ParseFile(pathbuf, true);
|
||||||
MakeHashOfStrings();
|
MakeHashOfStrings();
|
||||||
if (_errors != 0) return 1;
|
if (_errors != 0) return 1;
|
||||||
|
@ -1338,7 +1336,6 @@ int CDECL main(int argc, char *argv[])
|
||||||
mkpath(pathbuf, lengthof(pathbuf), src_dir, "english.txt");
|
mkpath(pathbuf, lengthof(pathbuf), src_dir, "english.txt");
|
||||||
|
|
||||||
/* parse master file and check if target file is correct */
|
/* parse master file and check if target file is correct */
|
||||||
_masterlang = false;
|
|
||||||
ParseFile(pathbuf, true);
|
ParseFile(pathbuf, true);
|
||||||
MakeHashOfStrings();
|
MakeHashOfStrings();
|
||||||
ParseFile(replace_pathsep(mgo.argv[0]), false); // target file
|
ParseFile(replace_pathsep(mgo.argv[0]), false); // target file
|
||||||
|
|
Loading…
Reference in New Issue