1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00

Refactor to avoid unnecessary copies (#13736)

* Refactor to avoid unnecessary copies

* Fix dangling references
This commit is contained in:
skdltmxn
2021-01-12 06:14:15 +09:00
committed by GitHub
parent b58038a23f
commit 7ef4d7762f
23 changed files with 52 additions and 40 deletions

View File

@@ -68,7 +68,7 @@ TEST_F(CryptTests, SHA1_Multiple)
};
auto alg = Crypt::CreateSHA1();
for (auto s : input)
for (const auto& s : input)
{
alg->Update(s.data(), s.size());
}
@@ -99,7 +99,7 @@ TEST_F(CryptTests, SHA1_Many)
"This park is really clean and tidy",
"This balloon from Balloon Stall 1 is really good value",
};
for (auto s : inputA)
for (const auto& s : inputA)
{
alg->Update(s.data(), s.size());
}
@@ -113,7 +113,7 @@ TEST_F(CryptTests, SHA1_Many)
"This park is really clean and tidy",
"Merry-go-round 2 looks too intense for me",
};
for (auto s : inputB)
for (const auto& s : inputB)
{
alg->Update(s.data(), s.size());
}