summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-24 16:11:17 +0300
committerOleg Morozenkov <reo7sp@users.noreply.github.com>2017-01-24 16:11:17 +0300
commit3549754e53f79e9ba0b00fb0bbded5d56a14ef51 (patch)
tree63b2601d4adec6025713c68def4c1b92c149fe89
parent989c691916d17c4819c75132dbbe36de1131c467 (diff)
Return empty GenericReply in parseJsonAndGetGenericReply. Fixes #35
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/TgTypeParser.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cdaf588..8c31193 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ project(TgBot)
option(ENABLE_TESTS "Set to ON to enable building of tests" OFF)
### sources
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
include_directories(include)
set(SRC_LIST
src/Api.cpp
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index b52533b..5fa19dd 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -588,6 +588,7 @@ GenericReply::Ptr TgTypeParser::parseJsonAndGetGenericReply(const boost::propert
} else if (data.find("inline_keyboard") != data.not_found()) {
return static_pointer_cast<GenericReply>(parseJsonAndGetInlineKeyboardMarkup(data));
}
+ return GenericReply::Ptr(new GenericReply);
}
std::string TgTypeParser::parseGenericReply(const GenericReply::Ptr& object) const {