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

@@ -968,7 +968,9 @@ public:
using JsonObject::JsonObject;
DocumentUri uri() const { return TextDocumentIdentifier(value("textDocument")).uri(); }
QList<Range> inactiveRegions() const { return array<Range>("regions"); }
QList<Range> inactiveRegions() const {
return array<Range>(LanguageServerProtocol::Key{"regions"});
}
};
class InactiveRegionsNotification : public Notification<InactiveRegionsParams>