From 3549754e53f79e9ba0b00fb0bbded5d56a14ef51 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Tue, 24 Jan 2017 16:11:17 +0300 Subject: Return empty GenericReply in parseJsonAndGetGenericReply. Fixes #35 --- CMakeLists.txt | 2 +- src/TgTypeParser.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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(parseJsonAndGetInlineKeyboardMarkup(data)); } + return GenericReply::Ptr(new GenericReply); } std::string TgTypeParser::parseGenericReply(const GenericReply::Ptr& object) const { -- cgit v1.2.3