diff options
Diffstat (limited to 'Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp')
-rwxr-xr-x | Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp b/Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp index 4f79312a0c3..78cf8950c24 100755 --- a/Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp +++ b/Build/source/utils/asymptote/LspCpp/src/jsonrpc/MessageJsonHandler.cpp @@ -6,52 +6,52 @@ std::unique_ptr<LspMessage> MessageJsonHandler::parseResponseMessage(const std::string& method, Reader& r) { - auto findIt = method2response.find(method); - - if( findIt != method2response.end()) - { - return findIt->second(r); - } - return nullptr; + auto findIt = method2response.find(method); + + if( findIt != method2response.end()) + { + return findIt->second(r); + } + return nullptr; } std::unique_ptr<LspMessage> MessageJsonHandler::parseRequstMessage(const std::string& method, Reader&r) { - auto findIt = method2request.find(method); + auto findIt = method2request.find(method); - if (findIt != method2request.end()) - { - return findIt->second(r); - } - return nullptr; + if (findIt != method2request.end()) + { + return findIt->second(r); + } + return nullptr; } bool MessageJsonHandler::resovleResponseMessage(Reader&r, std::pair<std::string, std::unique_ptr<LspMessage>>& result) { - for (auto& handler : method2response) - { - try - { - auto msg = handler.second(r); - result.first = handler.first; - result.second = std::move(msg); - return true; - } - catch (...) - { - - } - } - return false; + for (auto& handler : method2response) + { + try + { + auto msg = handler.second(r); + result.first = handler.first; + result.second = std::move(msg); + return true; + } + catch (...) + { + + } + } + return false; } std::unique_ptr<LspMessage> MessageJsonHandler::parseNotificationMessage(const std::string& method, Reader& r) { - auto findIt = method2notification.find(method); + auto findIt = method2notification.find(method); - if (findIt != method2notification.end()) - { - return findIt->second(r); - } - return nullptr; + if (findIt != method2notification.end()) + { + return findIt->second(r); + } + return nullptr; } |