summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--include/tgbot/TgTypeParser.h2
-rw-r--r--src/Api.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89ea260..f5ff1d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ project(TgBot)
### options
option(ENABLE_TESTS "Set to ON to enable building of tests" OFF)
+option(BUILD_SHARED_LIBS "Build tgbot-cpp shared/static library." OFF)
### sources
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
diff --git a/include/tgbot/TgTypeParser.h b/include/tgbot/TgTypeParser.h
index 356b69e..5ac322a 100644
--- a/include/tgbot/TgTypeParser.h
+++ b/include/tgbot/TgTypeParser.h
@@ -413,7 +413,7 @@ public:
}
private:
- inline void removeLastComma(std::string& input) const {
+ inline void removeLastComma(const std::string& input) const {
input.erase(input.length() - 1);
}
diff --git a/src/Api.cpp b/src/Api.cpp
index e6a39d7..3d8d3f6 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -245,7 +245,7 @@ Message::Ptr Api::sendInvoice(int64_t chatId, const std::string& title, const st
args.emplace_back("provider_token", providerToken);
args.emplace_back("start_parameter", startParameter);
args.emplace_back("currency", currency);
- args.emplace_back("prices", TgTypeParser::getInstance().parseArray<LabeledPrice>(&TgTypeParser::parseLabeledPrice, prices);
+ args.emplace_back("prices", TgTypeParser::getInstance().parseArray<LabeledPrice>(&TgTypeParser::parseLabeledPrice, prices));
if (!providerData.empty()) {
args.emplace_back("provider_data", providerData);
}