mirror of https://github.com/OpenTTD/OpenTTD
(svn r21347) -Cleanup: remove an unused feature from strgen and remove some ifs where we already know the result
parent
35af463046
commit
d81d42bfc3
|
@ -742,7 +742,6 @@ static void HandleString(char *str, bool master)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ent == NULL) {
|
|
||||||
if (_strings[_next_string_id]) {
|
if (_strings[_next_string_id]) {
|
||||||
strgen_error("String ID 0x%X for '%s' already in use by '%s'", _next_string_id, str, _strings[_next_string_id]->name);
|
strgen_error("String ID 0x%X for '%s' already in use by '%s'", _next_string_id, str, _strings[_next_string_id]->name);
|
||||||
return;
|
return;
|
||||||
|
@ -756,7 +755,6 @@ static void HandleString(char *str, bool master)
|
||||||
ent->line = _cur_line;
|
ent->line = _cur_line;
|
||||||
|
|
||||||
HashAdd(str, ent);
|
HashAdd(str, ent);
|
||||||
}
|
|
||||||
|
|
||||||
ent->english = strdup(s);
|
ent->english = strdup(s);
|
||||||
} else {
|
} else {
|
||||||
|
@ -770,10 +768,6 @@ static void HandleString(char *str, bool master)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s[0] == ':' && s[1] == '\0' && casep == NULL) {
|
|
||||||
/* Special syntax :: means we should just inherit the master string */
|
|
||||||
ent->translated = strdup(ent->english);
|
|
||||||
} else {
|
|
||||||
/* make sure that the commands match */
|
/* make sure that the commands match */
|
||||||
if (!CheckCommandsMatch(s, ent->english, str)) return;
|
if (!CheckCommandsMatch(s, ent->english, str)) return;
|
||||||
|
|
||||||
|
@ -792,7 +786,6 @@ static void HandleString(char *str, bool master)
|
||||||
ent->line = _cur_line;
|
ent->line = _cur_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue