1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Irrlicht cleanups (mostly getting rid of core::array)

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
sfan5 2024-08-17 19:49:11 +02:00 committed by GitHub
parent 5acc2736db
commit 5d226268df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 308 additions and 1227 deletions

View file

@ -325,7 +325,7 @@ bool CZipReader::scanZipHeader(bool ignoreGPBits)
dirEnd.Offset = os::Byteswap::byteswap(dirEnd.Offset);
dirEnd.CommentLength = os::Byteswap::byteswap(dirEnd.CommentLength);
#endif
FileInfo.reallocate(dirEnd.TotalEntries);
FileInfo.reserve(dirEnd.TotalEntries);
File->seek(dirEnd.Offset);
while (scanCentralDirectoryHeader()) {
}
@ -381,9 +381,10 @@ bool CZipReader::scanCentralDirectoryHeader()
File->seek(entry.RelativeOffsetOfLocalHeader);
scanZipHeader(true);
File->seek(pos + entry.FilenameLength + entry.ExtraFieldLength + entry.FileCommentLength);
FileInfo.getLast().header.DataDescriptor.CompressedSize = entry.CompressedSize;
FileInfo.getLast().header.DataDescriptor.UncompressedSize = entry.UncompressedSize;
FileInfo.getLast().header.DataDescriptor.CRC32 = entry.CRC32;
auto &lastInfo = FileInfo.back();
lastInfo.header.DataDescriptor.CompressedSize = entry.CompressedSize;
lastInfo.header.DataDescriptor.UncompressedSize = entry.UncompressedSize;
lastInfo.header.DataDescriptor.CRC32 = entry.CRC32;
Files.getLast().Size = entry.UncompressedSize;
return true;
}