mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 03:55:49 +00:00
[formatting] Refrain from std::make_unique until migration to C++14 or C++17
This commit is contained in:
parent
cd2f3c1e45
commit
f9aa0ef66d
@ -60,10 +60,11 @@ struct TextDocumentFormattingHandler
|
||||
int tab_size = request->params.options.tabSize;
|
||||
bool insert_spaces = request->params.options.insertSpaces;
|
||||
|
||||
const auto clang_format = std::unique_ptr<ClangFormat>(new ClangFormat(
|
||||
const auto clang_format = MakeUnique<ClangFormat>(
|
||||
working_file->filename, working_file->buffer_content,
|
||||
{clang::tooling::Range(0, working_file->buffer_content.size())},
|
||||
tab_size, insert_spaces));
|
||||
llvm::ArrayRef<clang::tooling::Range>(
|
||||
clang::tooling::Range(0, working_file->buffer_content.size())),
|
||||
tab_size, insert_spaces);
|
||||
const auto replacements = clang_format->FormatWholeDocument();
|
||||
response.result = ConvertClangReplacementsIntoTextEdits(
|
||||
working_file->buffer_content, replacements);
|
||||
|
Loading…
Reference in New Issue
Block a user