From ac3e87822afb6065a82dfe547ecbc0c307a04147 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 4 Jul 2018 19:27:20 +0300 Subject: Remove string literal. --- src/Api.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Api.cpp') diff --git a/src/Api.cpp b/src/Api.cpp index 3bb200b..abc99de 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -861,7 +861,7 @@ Message::Ptr Api::editMessageText(const string& text, int64_t chatId, int32_t me return TgTypeParser::getInstance().parseJsonAndGetMessage(p); } else { return nullptr; - } + } } Message::Ptr Api::editMessageCaption(int64_t chatId, int32_t messageId, const string& caption, @@ -983,7 +983,7 @@ WebhookInfo::Ptr Api::getWebhookInfo() const { } if (p.get("url","") != string("")) { return TgTypeParser::getInstance().parseJsonAndGetWebhookInfo(p); - } + } else { return nullptr; } @@ -1199,7 +1199,7 @@ ptree Api::sendRequest(const string& method, const vector& args) con url += "/"; url += method; - string serverResponse = _httpClientDriver.makeRequest(url, args); + string serverResponse = _httpClientDriver.makeRequest(url, args); if (!serverResponse.compare(0, 6, "")) { throw TgException("tgbot-cpp library have got html page instead of json response. Maybe you entered wrong bot token."); } @@ -1222,7 +1222,7 @@ string Api::downloadFile(const string& filePath, const std::vector& url += "/"; url += filePath; - string serverResponse = _httpClientDriver.makeRequest(url, args); + string serverResponse = _httpClientDriver.makeRequest(url, args); return serverResponse; } -- cgit v1.2.3