Minor type cleanup

This commit is contained in:
Jacob Dufault 2018-03-22 20:52:06 -07:00 committed by Fangrui Song
parent b110f0f96c
commit 98090c543d
3 changed files with 10 additions and 11 deletions

View File

@ -306,7 +306,6 @@ void LaunchStdinLoop(Config* config,
MethodType method_type = message->GetMethodType();
(*request_times)[method_type] = Timer();
LOG_S(ERROR) << "!! Got message of type " << method_type;
queue->for_querydb.PushBack(std::move(message));
// If the message was to exit then querydb will take care of the actual

View File

@ -1,10 +1,10 @@
#include "method.h"
const char* kMethodType_Unknown = "$unknown";
const char* kMethodType_Exit = "exit";
const char* kMethodType_TextDocumentPublishDiagnostics = "textDocument/publishDiagnostics";
const char* kMethodType_CqueryPublishInactiveRegions = "$cquery/publishInactiveRegions";
const char* kMethodType_CqueryPublishSemanticHighlighting = "$cquery/publishSemanticHighlighting";
MethodType kMethodType_Unknown = "$unknown";
MethodType kMethodType_Exit = "exit";
MethodType kMethodType_TextDocumentPublishDiagnostics = "textDocument/publishDiagnostics";
MethodType kMethodType_CqueryPublishInactiveRegions = "$cquery/publishInactiveRegions";
MethodType kMethodType_CqueryPublishSemanticHighlighting = "$cquery/publishSemanticHighlighting";
InMessage::~InMessage() = default;

View File

@ -6,11 +6,11 @@
#include <string>
using MethodType = std::string;
extern const char* kMethodType_Unknown;
extern const char* kMethodType_Exit;
extern const char* kMethodType_TextDocumentPublishDiagnostics;
extern const char* kMethodType_CqueryPublishInactiveRegions;
extern const char* kMethodType_CqueryPublishSemanticHighlighting;
extern MethodType kMethodType_Unknown;
extern MethodType kMethodType_Exit;
extern MethodType kMethodType_TextDocumentPublishDiagnostics;
extern MethodType kMethodType_CqueryPublishInactiveRegions;
extern MethodType kMethodType_CqueryPublishSemanticHighlighting;
using lsRequestId = std::variant<std::monostate, int64_t, std::string>;