mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 12:55:02 +02:00
clang-tidy: Add performance-inefficient-vector-operation check
https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html
This commit is contained in:
@@ -156,6 +156,7 @@ BOOST_AUTO_TEST_CASE(set)
|
||||
FillableSigningProvider keystore;
|
||||
CKey key[4];
|
||||
std::vector<CPubKey> keys;
|
||||
keys.reserve(4);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
key[i].MakeNewKey(true);
|
||||
@@ -270,12 +271,13 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
|
||||
CCoinsViewCache coins(&coinsDummy);
|
||||
FillableSigningProvider keystore;
|
||||
CKey key[6];
|
||||
std::vector<CPubKey> keys;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
key[i].MakeNewKey(true);
|
||||
BOOST_CHECK(keystore.AddKey(key[i]));
|
||||
}
|
||||
std::vector<CPubKey> keys;
|
||||
keys.reserve(3);
|
||||
for (int i = 0; i < 3; i++)
|
||||
keys.push_back(key[i].GetPubKey());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user