From a1acba9a850cf80cf645756dd938940beafa57e7 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Sun, 15 Mar 2020 13:43:30 +0300 Subject: Use make_unique if C++14 and above is available. Kudos to @JellyBrick. --- src/Bot.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Bot.cpp b/src/Bot.cpp index 8e6d667..706a3ce 100644 --- a/src/Bot.cpp +++ b/src/Bot.cpp @@ -7,9 +7,11 @@ namespace TgBot { Bot::Bot(std::string token, const HttpClient& httpClient) : _token(std::move(token)) , _api(_token, httpClient) - // uncomment when c++14 is available - //, _eventBroadcaster(std::make_unique()) +#if __cplusplus > 201103L + , _eventBroadcaster(std::make_unique()) +#else , _eventBroadcaster(new EventBroadcaster()) +#endif , _eventHandler(getEvents()) { } -- cgit v1.2.3