fix: enum class amb base std::uint8_t (33 troballes)

This commit is contained in:
2026-05-14 22:32:57 +02:00
parent 058f7b118a
commit ac93cfa7d7
35 changed files with 120 additions and 113 deletions
+4 -5
View File
@@ -6,19 +6,18 @@
#include <SDL3/SDL_filesystem.h>
#include <algorithm>
#include <numeric>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <numeric>
namespace Resource {
// Calculate CRC32 checksum for data verification
auto Pack::calculateChecksum(const std::vector<uint8_t>& data) -> uint32_t { // NOLINT(readability-convert-member-functions-to-static)
return std::accumulate(data.begin(), data.end(), uint32_t{0x12345678},
[](uint32_t acc, unsigned char byte) -> uint32_t {
return ((acc << 5) + acc) + byte;
});
return std::accumulate(data.begin(), data.end(), uint32_t{0x12345678}, [](uint32_t acc, unsigned char byte) -> uint32_t {
return ((acc << 5) + acc) + byte;
});
}
// XOR encryption (symmetric - same function for encrypt/decrypt)