From e71c6a8c10b53bec9501eee689c7a37c27cc9ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Tue, 28 Feb 2017 14:46:40 +0100 Subject: [PATCH] C++ wrapper: fix carsh on Core creation --- wrappers/cpp/class_impl.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrappers/cpp/class_impl.mustache b/wrappers/cpp/class_impl.mustache index 8e7d9ba13..26615b5ed 100644 --- a/wrappers/cpp/class_impl.mustache +++ b/wrappers/cpp/class_impl.mustache @@ -74,8 +74,8 @@ void {{{className}}}::removeListener(const std::shared_ptr<{{{listenerClassName} {{#isfactory}} std::shared_ptr Factory::createCore(const std::shared_ptr & listener, const std::string & configPath, const std::string & factoryConfigPath) const { ::LinphoneCoreCbs *cbs = NULL; + std::list > listeners; if (listener != nullptr) { - std::list > listeners; listeners.push_back(std::static_pointer_cast(listener)); cbs = Core::createCallbacks(&listeners); } @@ -95,8 +95,8 @@ std::shared_ptr Factory::createCore(const std::shared_ptr & std::shared_ptr Factory::createCoreWithConfig(const std::shared_ptr & listener, const std::shared_ptr & config) const { ::LinphoneCoreCbs *cbs = NULL; + std::list > listeners; if (listener != nullptr) { - std::list > listeners; listeners.push_back(std::static_pointer_cast(listener)); cbs = Core::createCallbacks(&listeners); }