mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-15 08:52:02 +00:00
addressed a few warnings in the filesystem code.
This commit is contained in:
parent
df5dc5ebd8
commit
efef4bdfd1
5 changed files with 6 additions and 6 deletions
|
@ -119,7 +119,7 @@ public:
|
|||
|
||||
static uint32_t LumpNameHash (const char *name); // [RH] Create hash key from an 8-char name
|
||||
|
||||
int FileLength (int lump) const;
|
||||
ptrdiff_t FileLength (int lump) const;
|
||||
int GetFileFlags (int lump); // Return the flags for this lump
|
||||
const char* GetFileShortName(int lump) const;
|
||||
const char *GetFileFullName (int lump, bool returnshort = true) const; // [RH] Returns the lump's full name
|
||||
|
|
|
@ -167,7 +167,7 @@ unsigned int FZipExploder::InitTable(std::vector<HuffNode> &decoder, int numspot
|
|||
size_t start = decoder.size();
|
||||
decoder.resize(decoder.size() + numspots);
|
||||
memset(&decoder[start], 0, sizeof(HuffNode)*numspots);
|
||||
return start;
|
||||
return (unsigned)start;
|
||||
}
|
||||
|
||||
int FZipExploder::buildercmp(const void *a, const void *b)
|
||||
|
|
|
@ -73,7 +73,7 @@ static bool OpenHog(FResourceFile* rf, LumpFilterInfo* filter)
|
|||
entries.push_back(Entry);
|
||||
Reader->Seek(elength, FileReader::SeekCur);
|
||||
}
|
||||
auto Entries = rf->AllocateEntries(entries.size());
|
||||
auto Entries = rf->AllocateEntries((int)entries.size());
|
||||
memcpy(Entries, entries.data(), entries.size() * sizeof(Entries[0]));
|
||||
rf->GenerateHash();
|
||||
return true;
|
||||
|
|
|
@ -774,14 +774,14 @@ int FileSystem::GetResource (int resid, const char *type, int filenum) const
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int FileSystem::FileLength (int lump) const
|
||||
ptrdiff_t FileSystem::FileLength (int lump) const
|
||||
{
|
||||
if ((size_t)lump >= NumEntries)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
const auto &lump_p = FileInfo[lump];
|
||||
return lump_p.resfile->Length(lump_p.resindex);
|
||||
return (int)lump_p.resfile->Length(lump_p.resindex);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -151,7 +151,7 @@ bool unicode_validate(const char* str)
|
|||
while (*str != 0)
|
||||
{
|
||||
int cp;
|
||||
int result = utf8proc_iterate((const uint8_t*)str, -1, &cp);
|
||||
auto result = utf8proc_iterate((const uint8_t*)str, -1, &cp);
|
||||
if (result < 0) return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue