2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-06-25 22:01:54 +00:00

refactor: only use sizeof with parenthesis

This commit is contained in:
Jan
2024-03-24 19:56:06 +01:00
parent 4f0ee35740
commit 1b13f1f1b4
16 changed files with 33 additions and 33 deletions

View File

@ -114,11 +114,11 @@ class ZoneLoaderFactory::Impl
zoneLoader->AddLoadingStep(std::make_unique<StepVerifyMagic>(ZoneConstants::MAGIC_AUTH_HEADER));
zoneLoader->AddLoadingStep(std::make_unique<StepSkipBytes>(4)); // Skip reserved
auto subHeaderHash = std::make_unique<StepLoadHash>(sizeof DB_AuthHash::bytes, 1);
auto subHeaderHash = std::make_unique<StepLoadHash>(sizeof(DB_AuthHash::bytes), 1);
auto* subHeaderHashPtr = subHeaderHash.get();
zoneLoader->AddLoadingStep(std::move(subHeaderHash));
auto subHeaderHashSignature = std::make_unique<StepLoadSignature>(sizeof DB_AuthSignature::bytes);
auto subHeaderHashSignature = std::make_unique<StepLoadSignature>(sizeof(DB_AuthSignature::bytes));
auto* subHeaderHashSignaturePtr = subHeaderHashSignature.get();
zoneLoader->AddLoadingStep(std::move(subHeaderHashSignature));
@ -131,7 +131,7 @@ class ZoneLoaderFactory::Impl
zoneLoader->AddLoadingStep(std::make_unique<StepVerifyFileName>(fileName, sizeof(DB_AuthSubHeader::fastfileName)));
zoneLoader->AddLoadingStep(std::make_unique<StepSkipBytes>(4)); // Skip reserved
auto masterBlockHashes = std::make_unique<StepLoadHash>(sizeof DB_AuthHash::bytes, std::extent_v<decltype(DB_AuthSubHeader::masterBlockHashes)>);
auto masterBlockHashes = std::make_unique<StepLoadHash>(sizeof(DB_AuthHash::bytes), std::extent_v<decltype(DB_AuthSubHeader::masterBlockHashes)>);
auto* masterBlockHashesPtr = masterBlockHashes.get();
zoneLoader->AddLoadingStep(std::move(masterBlockHashes));