mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01: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:
@@ -608,6 +608,7 @@ bool RPCHelpMan::IsValidNumArgs(size_t num_args) const
|
||||
std::vector<std::string> RPCHelpMan::GetArgNames() const
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
ret.reserve(m_args.size());
|
||||
for (const auto& arg : m_args) {
|
||||
ret.emplace_back(arg.m_names);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user