mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-09 04:14:11 +00:00
[clang-include-fixer] Pre-reserve vector size. NFC
This commit is contained in:
parent
cdc60a3b9a
commit
08274d7d5d
@ -149,6 +149,7 @@ SymbolIndexManager::search(llvm::StringRef Identifier,
|
|||||||
rank(MatchedSymbols, FileName);
|
rank(MatchedSymbols, FileName);
|
||||||
// Strip signals, they are no longer needed.
|
// Strip signals, they are no longer needed.
|
||||||
std::vector<SymbolInfo> Res;
|
std::vector<SymbolInfo> Res;
|
||||||
|
Res.reserve(MatchedSymbols.size());
|
||||||
for (auto &SymAndSig : MatchedSymbols)
|
for (auto &SymAndSig : MatchedSymbols)
|
||||||
Res.push_back(std::move(SymAndSig.Symbol));
|
Res.push_back(std::move(SymAndSig.Symbol));
|
||||||
return Res;
|
return Res;
|
||||||
|
Loading…
Reference in New Issue
Block a user