diff --git a/common/lc_blenderpreferences.cpp b/common/lc_blenderpreferences.cpp index 6bac634f..9689e33b 100644 --- a/common/lc_blenderpreferences.cpp +++ b/common/lc_blenderpreferences.cpp @@ -3631,7 +3631,7 @@ bool lcBlenderPreferences::ExtractAddon(const QString FileName, QString& Result) int Extracted = 0; - for (int FileIdx = 0; FileIdx < ZipFile.mFiles.GetSize(); FileIdx++) + for (quint32 FileIdx = 0; FileIdx < ZipFile.mFiles.size(); FileIdx++) { ZipFileInfo FileInfo(ZipFile.mFiles[FileIdx]); quint32 Mode = FileInfo.ZipInfo.external_fa; @@ -3742,7 +3742,7 @@ bool lcBlenderPreferences::ExtractAddon(const QString FileName, QString& Result) } if (!Ok) - Result = tr("%1 of %2 files extracted.").arg(Extracted).arg(ZipFile.mFiles.GetSize()); + Result = tr("%1 of %2 files extracted.").arg(Extracted).arg(ZipFile.mFiles.size()); return Ok; } diff --git a/common/lc_library.cpp b/common/lc_library.cpp index 12a2f833..3e3b67bd 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -379,7 +379,7 @@ bool lcPiecesLibrary::OpenArchive(std::unique_ptr File, lcZipFileType Zi std::unique_ptr Source(new lcLibrarySource); Source->Type = ZipFileType != lcZipFileType::StudStyle ? lcLibrarySourceType::Library : lcLibrarySourceType::StudStyle; - for (int FileIdx = 0; FileIdx < ZipFile->mFiles.GetSize(); FileIdx++) + for (quint32 FileIdx = 0; FileIdx < ZipFile->mFiles.size(); FileIdx++) { lcZipFileInfo& FileInfo = ZipFile->mFiles[FileIdx]; char NameBuffer[LC_PIECE_NAME_LEN]; diff --git a/common/lc_synth.cpp b/common/lc_synth.cpp index 6d0fdfea..596e5f52 100644 --- a/common/lc_synth.cpp +++ b/common/lc_synth.cpp @@ -1515,8 +1515,6 @@ lcMesh* lcSynthInfo::CreateMesh(const std::vector& ControlP AddParts(File, MeshData, Sections); File.WriteU8(0); - - lcArray TextureStack; File.Seek(0, SEEK_SET); lcMeshLoader MeshLoader(MeshData, false, nullptr, false); diff --git a/common/lc_zipfile.cpp b/common/lc_zipfile.cpp index 3ad2cc78..8709ffbf 100644 --- a/common/lc_zipfile.cpp +++ b/common/lc_zipfile.cpp @@ -352,12 +352,12 @@ bool lcZipFile::ReadCentralDir() quint64 PosInCentralDir = mCentralDirOffset; mFile->Seek(PosInCentralDir + mBytesBeforeZipFile, SEEK_SET); - mFiles.AllocGrow((int)mNumEntries); + mFiles.reserve(mNumEntries); for (quint64 FileNum = 0; FileNum < mNumEntries; FileNum++) { quint32 Magic, Number32; - lcZipFileInfo& FileInfo = mFiles.Add(); + lcZipFileInfo& FileInfo = mFiles.emplace_back(); long Seek = 0; FileInfo.write_buffer = nullptr; @@ -569,7 +569,7 @@ bool lcZipFile::ReadCentralDir() bool lcZipFile::ExtractFile(const char* FileName, lcMemFile& File, quint32 MaxLength) { - for (int FileIdx = 0; FileIdx < mFiles.GetSize(); FileIdx++) + for (quint32 FileIdx = 0; FileIdx < mFiles.size(); FileIdx++) { lcZipFileInfo& FileInfo = mFiles[FileIdx]; @@ -580,7 +580,7 @@ bool lcZipFile::ExtractFile(const char* FileName, lcMemFile& File, quint32 MaxLe return false; } -bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, quint32 MaxLength) +bool lcZipFile::ExtractFile(quint32 FileIndex, lcMemFile& File, quint32 MaxLength) { QMutexLocker Lock(&mMutex); diff --git a/common/lc_zipfile.h b/common/lc_zipfile.h index 8b77fc00..c1d5349d 100644 --- a/common/lc_zipfile.h +++ b/common/lc_zipfile.h @@ -1,7 +1,5 @@ #pragma once -#include "lc_array.h" - #ifdef DeleteFile #undef DeleteFile #endif @@ -61,10 +59,10 @@ public: bool OpenRead(std::unique_ptr File); bool OpenWrite(const QString& FileName); - bool ExtractFile(int FileIndex, lcMemFile& File, quint32 MaxLength = 0xffffffff); + bool ExtractFile(quint32 FileIndex, lcMemFile& File, quint32 MaxLength = 0xffffffff); bool ExtractFile(const char* FileName, lcMemFile& File, quint32 MaxLength = 0xffffffff); - lcArray mFiles; + std::vector mFiles; protected: bool Open(); diff --git a/common/pieceinf.cpp b/common/pieceinf.cpp index a1838575..d3b95329 100644 --- a/common/pieceinf.cpp +++ b/common/pieceinf.cpp @@ -86,7 +86,6 @@ void PieceInfo::SetModel(lcModel* Model, bool UpdateMesh, Project* CurrentProjec } lcLibraryMeshData MeshData; - lcArray TextureStack; PieceFile.Seek(0, SEEK_SET); lcMeshLoader MeshLoader(MeshData, true, CurrentProject, SearchProjectFolder);