Fix: MSVC warnings (#7423)

This commit is contained in:
glx22
2019-03-28 00:09:33 +01:00
committed by GitHub
parent e817951bfd
commit 66dd7c3879
39 changed files with 88 additions and 88 deletions

View File

@@ -1029,14 +1029,14 @@ void LanguageWriter::WriteLang(const StringData &data)
for (c = casep; c != NULL; c = c->next) {
buffer.AppendByte(c->caseidx);
/* Make some space for the 16-bit length */
uint pos = buffer.size();
uint pos = (uint)buffer.size();
buffer.AppendByte(0);
buffer.AppendByte(0);
/* Write string */
PutCommandString(&buffer, c->string);
buffer.AppendByte(0); // terminate with a zero
/* Fill in the length */
uint size = buffer.size() - (pos + 2);
uint size = (uint)buffer.size() - (pos + 2);
buffer[pos + 0] = GB(size, 8, 8);
buffer[pos + 1] = GB(size, 0, 8);
}
@@ -1044,7 +1044,7 @@ void LanguageWriter::WriteLang(const StringData &data)
if (cmdp != NULL) PutCommandString(&buffer, cmdp);
this->WriteLength(buffer.size());
this->WriteLength((uint)buffer.size());
this->Write(buffer.data(), buffer.size());
buffer.clear();
}