LSP: Avoid running strlen() on json keys

This feels better when stepping through the code but doesn't
really make a difference in the profile.

Change-Id: I2c30578bf1e990b039caadb8b8ce532f009b775d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2023-12-12 12:58:45 +01:00
parent d8561ccb2d
commit 570344b066
18 changed files with 318 additions and 308 deletions

View File

@@ -623,7 +623,7 @@ IAssistProposal *ClangdFunctionHintProcessor::perform()
ClangdCompletionCapabilities::ClangdCompletionCapabilities(const JsonObject &object)
: TextDocumentClientCapabilities::CompletionCapabilities(object)
{
insert("editsNearCursor", true); // For dot-to-arrow correction.
insert(Key{"editsNearCursor"}, true); // For dot-to-arrow correction.
if (std::optional<CompletionItemCapbilities> completionItemCaps = completionItem()) {
completionItemCaps->setSnippetSupport(false);
setCompletionItem(*completionItemCaps);