From 4270b4fdef7d696a1c59192faac2c3602703ae5f Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Thu, 22 Mar 2018 20:52:06 -0700 Subject: [PATCH] Minor type cleanup --- src/command_line.cc | 1 - src/method.cc | 10 +++++----- src/method.h | 10 +++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/command_line.cc b/src/command_line.cc index 14bd2c35..1a6b217b 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -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 diff --git a/src/method.cc b/src/method.cc index 43e136fb..cd24524d 100644 --- a/src/method.cc +++ b/src/method.cc @@ -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; diff --git a/src/method.h b/src/method.h index 2a329866..8a3673d3 100644 --- a/src/method.h +++ b/src/method.h @@ -6,11 +6,11 @@ #include 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;