Code/Framework fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -75,7 +75,7 @@ namespace AZ::IO::ZipDir
|
||||
for (i = 0; i < AZ_ARRAY_SIZE(szBuf) - 1; ++i)
|
||||
{
|
||||
int r = distrib(gen);
|
||||
szBuf[i] = r > 9 ? (r - 10) + 'a' : '0' + r;
|
||||
szBuf[i] = static_cast<char>(r > 9 ? (r - 10) + 'a' : '0' + r);
|
||||
}
|
||||
szBuf[i] = '\0';
|
||||
return szBuf;
|
||||
|
||||
@@ -832,18 +832,18 @@ namespace AZ::IO::ZipDir
|
||||
// conversion routines for the date/time fields used in Zip
|
||||
uint16_t DOSDate(tm* t)
|
||||
{
|
||||
return
|
||||
return static_cast<uint16_t>(
|
||||
((t->tm_year - 80) << 9)
|
||||
| (t->tm_mon << 5)
|
||||
| t->tm_mday;
|
||||
| t->tm_mday);
|
||||
}
|
||||
|
||||
uint16_t DOSTime(tm* t)
|
||||
{
|
||||
return
|
||||
return static_cast<uint16_t>(
|
||||
((t->tm_hour) << 11)
|
||||
| ((t->tm_min) << 5)
|
||||
| ((t->tm_sec) >> 1);
|
||||
| ((t->tm_sec) >> 1));
|
||||
}
|
||||
|
||||
// sets the current time to modification time
|
||||
@@ -872,7 +872,7 @@ namespace AZ::IO::ZipDir
|
||||
// we'll need CRC32 of the file to pack it
|
||||
this->desc.lCRC32 = AZ::Crc32(pUncompressed, nSize);
|
||||
|
||||
this->nMethod = nCompressionMethod;
|
||||
this->nMethod = static_cast<uint16_t>(nCompressionMethod);
|
||||
}
|
||||
|
||||
uint64_t FileEntry::GetModificationTime()
|
||||
|
||||
Reference in New Issue
Block a user