Author: Kazu Hirata Date: 2024-08-23T08:45:29-07:00 New Revision: 5a25854ed18ec5a51df6d1f7a2366a574a6846b0
URL: https://github.com/llvm/llvm-project/commit/5a25854ed18ec5a51df6d1f7a2366a574a6846b0 DIFF: https://github.com/llvm/llvm-project/commit/5a25854ed18ec5a51df6d1f7a2366a574a6846b0.diff LOG: [clangd] Construct SmallVector with ArrayRef (NFC) (#105829) Added: Modified: clang-tools-extra/clangd/TUScheduler.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 324ba1fc8cb895..71548b59cc3088 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -1838,7 +1838,7 @@ DebouncePolicy::compute(llvm::ArrayRef<clock::duration> History) const { // Base the result on the median rebuild. // nth_element needs a mutable array, take the chance to bound the data size. History = History.take_back(15); - llvm::SmallVector<clock::duration, 15> Recent(History.begin(), History.end()); + llvm::SmallVector<clock::duration, 15> Recent(History); auto *Median = Recent.begin() + Recent.size() / 2; std::nth_element(Recent.begin(), Median, Recent.end()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits