Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rts/System/FileSystem/Archives/DirArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CDirArchive::CDirArchive(const std::string& archiveName)

// all variables here will use forward slashes, no need for conversion
std::string rawFileName = dataDirsAccess.LocateFile(dirName + origName);
files.emplace_back(origName, std::move(rawFileName), -1, 0);
files.emplace_back(Files{origName, std::move(rawFileName), -1, 0});

// convert to lowercase and store
lcNameIndex[StringToLower(std::move(origName))] = static_cast<decltype(lcNameIndex)::value_type::second_type>(files.size() - 1);
Expand Down
8 changes: 4 additions & 4 deletions rts/System/FileSystem/Archives/SevenZipArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ CSevenZipArchive::CSevenZipArchive(const std::string& name)
continue;
}

const auto& fd = fileEntries.emplace_back(
i, //fp
SzArEx_GetFileSize(&db, i), // size
const auto& fd = fileEntries.emplace_back(FileEntry{
static_cast<int>(i), //fp
static_cast<int>(SzArEx_GetFileSize(&db, i)), // size
db.MTime.Vals ? static_cast<uint32_t>(CTimeUtil::NTFSTimeToTime64(db.MTime.Vals[i].Low, db.MTime.Vals[i].High)) : 0, // modtime
std::move(fileName.value()) // origName
);
});

lcNameIndex.emplace(StringToLower(fd.origName), fileEntries.size() - 1);
}
Expand Down
8 changes: 4 additions & 4 deletions rts/System/FileSystem/Archives/ZipArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ CZipArchive::CZipArchive(const std::string& archiveName)
unz_file_pos fp{};
unzGetFilePos(zip, &fp);

const auto& fd = fileEntries.emplace_back(
const auto& fd = fileEntries.emplace_back(FileEntry{
std::move(fp), //fp
info.uncompressed_size, //size
static_cast<int>(info.uncompressed_size), //size
fName, //origName
info.crc, //crc
static_cast<uint32_t>(info.crc), //crc
static_cast<uint32_t>(CTimeUtil::DosTimeToTime64(info.dosDate)) //modTime
);
});

lcNameIndex.emplace(StringToLower(fd.origName), fileEntries.size() - 1);
}
Expand Down