strgen: Fix type conversion warnings
This commit is contained in:
@@ -39,7 +39,7 @@ struct LangString {
|
|||||||
std::unique_ptr<LangString> chain_after;
|
std::unique_ptr<LangString> chain_after;
|
||||||
LangString *default_translation = nullptr;
|
LangString *default_translation = nullptr;
|
||||||
|
|
||||||
LangString(const char *name, const char *english, size_t index, int line);
|
LangString(const char *name, const char *english, int index, int line);
|
||||||
void ReplaceDefinition(const char *name, const char *english, int line);
|
void ReplaceDefinition(const char *name, const char *english, int line);
|
||||||
~LangString();
|
~LangString();
|
||||||
void FreeTranslation();
|
void FreeTranslation();
|
||||||
|
@@ -56,7 +56,7 @@ Case::~Case()
|
|||||||
* @param index The index in the string table.
|
* @param index The index in the string table.
|
||||||
* @param line The line this string was found on.
|
* @param line The line this string was found on.
|
||||||
*/
|
*/
|
||||||
LangString::LangString(const char *name, const char *english, size_t index, int line) :
|
LangString::LangString(const char *name, const char *english, int index, int line) :
|
||||||
name(stredup(name)), english(stredup(english)), translated(nullptr),
|
name(stredup(name)), english(stredup(english)), translated(nullptr),
|
||||||
hash_next(0), index(index), line(line), translated_case(nullptr)
|
hash_next(0), index(index), line(line), translated_case(nullptr)
|
||||||
{
|
{
|
||||||
@@ -891,7 +891,7 @@ void StringReader::AssignIDs(size_t &next_id, LangString *ls)
|
|||||||
if (ls->index >= 0) {
|
if (ls->index >= 0) {
|
||||||
next_id = ls->index;
|
next_id = ls->index;
|
||||||
} else {
|
} else {
|
||||||
ls->index = next_id;
|
ls->index = (int)next_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((size_t)ls->index >= this->data.max_strings) {
|
if ((size_t)ls->index >= this->data.max_strings) {
|
||||||
|
Reference in New Issue
Block a user