diff options
Diffstat (limited to 'Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp')
-rwxr-xr-x | Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp b/Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp index 3c7c275d6da..a66108d2e54 100755 --- a/Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp +++ b/Build/source/utils/asymptote/LspCpp/src/jsonrpc/Endpoint.cpp @@ -4,43 +4,43 @@ bool GenericEndpoint::notify(std::unique_ptr<LspMessage> msg) { - auto findIt = method2notification.find(msg->GetMethodType()); - - if (findIt != method2notification.end()) - { - return findIt->second(std::move(msg)); - } - std::string info = "can't find method2notification for notification:\n" + msg->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - return false; + auto findIt = method2notification.find(msg->GetMethodType()); + + if (findIt != method2notification.end()) + { + return findIt->second(std::move(msg)); + } + std::string info = "can't find method2notification for notification:\n" + msg->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + return false; } bool GenericEndpoint::onResponse(const std::string& method, std::unique_ptr<LspMessage>msg) { - auto findIt = method2response.find(method); - - if (findIt != method2response.end()) - { - return findIt->second(std::move(msg)); - } - - std::string info = "can't find method2response for response:\n" + msg->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - - return false; + auto findIt = method2response.find(method); + + if (findIt != method2response.end()) + { + return findIt->second(std::move(msg)); + } + + std::string info = "can't find method2response for response:\n" + msg->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + + return false; } bool GenericEndpoint::onRequest(std::unique_ptr<LspMessage> request) { - auto findIt = method2request.find(request->GetMethodType()); - - if (findIt != method2request.end()) - { - return findIt->second(std::move(request)); - } - std::string info = "can't find method2request for request:\n" + request->ToJson() + "\n"; - log.log(lsp::Log::Level::SEVERE, info); - return false; + auto findIt = method2request.find(request->GetMethodType()); + + if (findIt != method2request.end()) + { + return findIt->second(std::move(request)); + } + std::string info = "can't find method2request for request:\n" + request->ToJson() + "\n"; + log.log(lsp::Log::Level::SEVERE, info); + return false; } |