cppcheck
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user