Mnieniono hash FNV-1a z 32b na 64b, String ścieżki do pliku przeniesiono na dół rekordu tablicy
This commit is contained in:
parent
4dbe684cd7
commit
942f94e1f0
8 changed files with 31 additions and 29 deletions
|
|
@ -133,18 +133,18 @@ void ViewCargo::GetFileList(const std::string& path)
|
|||
for (uint32_t i = 0; i < filesLen; ++i)
|
||||
{
|
||||
FilesTable fhTmp;
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.nameLen), sizeof(fhTmp.nameLen));
|
||||
|
||||
std::vector<char> nameBuffor(fhTmp.nameLen);
|
||||
cargo.read(nameBuffor.data(), fhTmp.nameLen);
|
||||
fhTmp.nameFile = std::string(nameBuffor.begin(), nameBuffor.end());
|
||||
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.hashName), sizeof(fhTmp.hashName));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.offset), sizeof(fhTmp.offset));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.size), sizeof(fhTmp.size));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.crc), sizeof(fhTmp.crc));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.isZip), sizeof(fhTmp.isZip));
|
||||
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.nameLen), sizeof(fhTmp.nameLen));
|
||||
|
||||
std::vector<char> nameBuffor(fhTmp.nameLen);
|
||||
cargo.read(nameBuffor.data(), fhTmp.nameLen);
|
||||
fhTmp.nameFile = std::string(nameBuffor.begin(), nameBuffor.end());
|
||||
|
||||
//Tworzenie wierszy tabeli
|
||||
CreateTableRow(fhTmp.nameFile, fhTmp.isZip, fhTmp.hashName);
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ void ViewCargo::GetFileList(const std::string& path)
|
|||
//-----------------------------------------------------------------------------
|
||||
// Generowanie wierszy do tabeli
|
||||
//-----------------------------------------------------------------------------
|
||||
void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& zip, const uint32_t& hash)
|
||||
void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& zip, const uint64_t& hash)
|
||||
{
|
||||
//Zamiania crc liczbowej na hex string
|
||||
std::stringstream ss;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue