Perform aggregate zero-init instead of .fill(0) where appropriate.
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m50s

Simpler and more consistent code.
This commit is contained in:
hashlag
2026-02-05 00:40:55 +03:00
parent ed22d29af0
commit 95e74db6ec
4 changed files with 17 additions and 38 deletions

View File

@@ -360,8 +360,7 @@ TEST(Arc4GenTests, GenerateOutIteratorUsageTest)
uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
Arc4Gen gen(key, key + std::size(key));
std::array<uint8_t, 23> out;
out.fill(0);
std::array<uint8_t, 23> out = {};
std::array<uint8_t, 23> expected =
{
@@ -380,8 +379,7 @@ TEST(Arc4GenTests, GenerateOutIteratorUsageTest)
uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
Arc4Gen gen(key, key + std::size(key));
std::array<uint8_t, 23> out;
out.fill(0);
std::array<uint8_t, 23> out = {};
std::array<uint8_t, 23> expected =
{
@@ -400,11 +398,8 @@ TEST(Arc4GenTests, GenerateOutIteratorUsageTest)
uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
Arc4Gen gen(key, key + std::size(key));
std::array<uint8_t, 20> out;
out.fill(0);
std::array<uint8_t, 20> expected;
expected.fill(0);
std::array<uint8_t, 20> out = {};
std::array<uint8_t, 20> expected = {};
gen.Generate(out.begin() + 3, 0);