This commit is contained in:
2026-04-18 07:48:05 +02:00
parent 20b9a95619
commit 34a41ad25c
22 changed files with 97 additions and 79 deletions

View File

@@ -18,8 +18,7 @@ ResourcePack::~ResourcePack() {
}
uint32_t ResourcePack::calculateChecksum(const std::vector<uint8_t>& data) {
return std::accumulate(data.begin(), data.end(), uint32_t(0x12345678),
[](uint32_t acc, uint8_t b) { return ((acc << 5) + acc) + b; });
return std::accumulate(data.begin(), data.end(), uint32_t(0x12345678), [](uint32_t acc, uint8_t b) { return ((acc << 5) + acc) + b; });
}
void ResourcePack::encryptData(std::vector<uint8_t>& data, const std::string& key) {
@@ -157,6 +156,7 @@ bool ResourcePack::addDirectory(const std::string& directory) {
return false;
}
// cppcheck-suppress useStlAlgorithm
for (const auto& entry : std::filesystem::recursive_directory_iterator(directory)) {
if (entry.is_regular_file()) {
std::string filepath = entry.path().string();