diff options
author | 2023-01-11 11:21:59 +0000 | |
---|---|---|
committer | 2023-01-24 10:48:26 +0000 | |
commit | d59d4d116f9d40113c32c8b1225388308830b099 (patch) | |
tree | 693325828070d5a2eb3fbea6c1296ef1e38edc91 /artd/file_utils.cc | |
parent | abbadf0d5102c4110fc90f206966489b7b397ebd (diff) |
Fix performance-inefficient-vector-operation clang-tidy issues
Ignore-AOSP-first: this CL contains changes to ART services
that are currently being developed in the internal repo only.
Test: m tidy-art
Bug: 264654008
Change-Id: I6b0b495cbb934f9b8caedb389a643428d3cffc47
Diffstat (limited to 'artd/file_utils.cc')
-rw-r--r-- | artd/file_utils.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/artd/file_utils.cc b/artd/file_utils.cc index 45344e1343..53fe9f9625 100644 --- a/artd/file_utils.cc +++ b/artd/file_utils.cc @@ -149,6 +149,7 @@ Result<void> NewFile::CommitAllOrAbandon(const std::vector<NewFile*>& files_to_c // Move old files to temporary locations. std::vector<std::string_view> all_files_to_remove; + all_files_to_remove.reserve(files_to_commit.size() + files_to_remove.size()); for (NewFile* file : files_to_commit) { all_files_to_remove.push_back(file->FinalPath()); } |