fixed more warnings.

This commit is contained in:
Christoph Oelckers 2023-12-10 15:26:46 +01:00
parent c1ecc41f9d
commit aaea3d52aa
4 changed files with 6 additions and 6 deletions

View file

@ -762,9 +762,9 @@ FCompressedBuffer FSerializer::GetCompressedOutput()
int err;
stream.next_in = (Bytef *)w->mOutString.GetString();
stream.avail_in = buff.mSize;
stream.avail_in = (unsigned)buff.mSize;
stream.next_out = (Bytef*)compressbuf;
stream.avail_out = buff.mSize;
stream.avail_out = (unsigned)buff.mSize;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
stream.opaque = (voidpf)0;

View file

@ -63,7 +63,7 @@ struct HexDataSource
FScanner sc;
auto data = resf->Read(index);
sc.OpenMem("newconsolefont.hex", data.string(), data.size());
sc.OpenMem("newconsolefont.hex", data.string(), (int)data.size());
sc.SetCMode(true);
glyphdata.Push(0); // ensure that index 0 can be used as 'not present'.
while (sc.GetString())

View file

@ -137,7 +137,7 @@ bool IQMModel::Load(const char* path, int lumpnum, const char* buffer, int lengt
}
reader.SeekTo(ofs_anims);
for(int i = 0; i < Anims.Size(); i++)
for(unsigned i = 0; i < Anims.Size(); i++)
{
IQMAnim& anim = Anims[i];
anim.Name = reader.ReadName(text);

View file

@ -2568,7 +2568,7 @@ static void PMapValueWriter(FSerializer &ar, const M *map, const PMap *m)
{ // invalid
m->ValueType->WriteValue(ar,"invalid",static_cast<const void *>(&p->Value));
}
else if(p->Key == 0 || p->Key >= TexMan.NumTextures())
else if(p->Key == 0 || p->Key >= (unsigned)TexMan.NumTextures())
{ // null
m->ValueType->WriteValue(ar,"null",static_cast<const void *>(&p->Value));
}
@ -2693,7 +2693,7 @@ static bool PMapValueReader(FSerializer &ar, M *map, const PMap *m)
ar.EndObject();
return false;
}
int v = s.ToULong();
int v = (int)s.ToULong();
if (sysCallbacks.RemapTranslation) v = sysCallbacks.RemapTranslation(FTranslationID::fromInt(v)).index();