LSP: Use 8-bit keys in Json wrapper

Sufficient, smaller, faster.

Change-Id: I0d740785109538e04fc674c11d578ded8d2815fb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-08-11 17:30:01 +02:00
parent 1818236b2b
commit e2a370f280
17 changed files with 288 additions and 288 deletions

View File

@@ -10,8 +10,8 @@ namespace Copilot {
class CheckStatusParams : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t optionsKey[] = u"options";
static constexpr char16_t localChecksOnlyKey[] = u"options";
static constexpr char optionsKey[] = "options";
static constexpr char localChecksOnlyKey[] = "options";
public:
using JsonObject::JsonObject;
@@ -30,8 +30,8 @@ public:
class CheckStatusResponse : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t userKey[] = u"user";
static constexpr char16_t statusKey[] = u"status";
static constexpr char userKey[] = "user";
static constexpr char statusKey[] = "status";
public:
using JsonObject::JsonObject;

View File

@@ -11,8 +11,8 @@ namespace Copilot {
class Completion : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t displayTextKey[] = u"displayText";
static constexpr char16_t uuidKey[] = u"uuid";
static constexpr char displayTextKey[] = "displayText";
static constexpr char uuidKey[] = "uuid";
public:
using JsonObject::JsonObject;
@@ -41,7 +41,7 @@ public:
class GetCompletionParams : public LanguageServerProtocol::JsonObject
{
public:
static constexpr char16_t docKey[] = u"doc";
static constexpr char docKey[] = "doc";
GetCompletionParams(const LanguageServerProtocol::TextDocumentIdentifier &document,
int version,
@@ -95,7 +95,7 @@ public:
class GetCompletionResponse : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t completionKey[] = u"completions";
static constexpr char completionKey[] = "completions";
public:
using JsonObject::JsonObject;

View File

@@ -12,7 +12,7 @@ namespace Copilot {
class SignInConfirmParams : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t userCodeKey[] = u"userCode";
static constexpr char userCodeKey[] = "userCode";
public:
using JsonObject::JsonObject;

View File

@@ -17,8 +17,8 @@ using SignInInitiateParams = LanguageServerProtocol::JsonObject;
class SignInInitiateResponse : public LanguageServerProtocol::JsonObject
{
static constexpr char16_t verificationUriKey[] = u"verificationUri";
static constexpr char16_t userCodeKey[] = u"userCode";
static constexpr char verificationUriKey[] = "verificationUri";
static constexpr char userCodeKey[] = "userCode";
public:
using JsonObject::JsonObject;