forked from OSchip/llvm-project
[clangd] Fix MSVC compile error, attempt 2
This commit is contained in:
parent
6d53897554
commit
2cd0be02b9
|
@ -190,7 +190,13 @@ FileShardedIndex::FileShardedIndex(IndexFileIn Input, PathRef HintPath)
|
|||
}
|
||||
}
|
||||
std::vector<PathRef> FileShardedIndex::getAllFiles() const {
|
||||
return std::vector<PathRef>(Shards.keys().begin(), Shards.keys().end());
|
||||
// It should be enough to construct a vector with {Shards.keys().begin(),
|
||||
// Shards.keys().end()} but MSVC fails to compile that.
|
||||
std::vector<PathRef> Result;
|
||||
Result.reserve(Shards.size());
|
||||
for (PathRef Key : Shards.keys())
|
||||
Result.push_back(Key);
|
||||
return Result;
|
||||
}
|
||||
|
||||
IndexFileIn FileShardedIndex::getShard(PathRef File) const {
|
||||
|
|
Loading…
Reference in New Issue