1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02: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
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;
}