From b1c1a1a78186aa2d90378ebf15d779077c4a182f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 28 Feb 2019 19:56:59 +0100 Subject: api: kill useless cast --- api/plugin-support.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api') diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp index 1ee8e093..df1344bf 100644 --- a/api/plugin-support.hpp +++ b/api/plugin-support.hpp @@ -232,8 +232,8 @@ private: template std::shared_ptr make_dylib_instance(const std::shared_ptr& lib) { - std::shared_ptr ret; if (lib != nullptr && lib->Constructor) - ret = std::shared_ptr(reinterpret_cast(reinterpret_cast(lib->Constructor)())); - return ret; + return std::shared_ptr{(t*)lib->Constructor()}; + else + return nullptr; } -- cgit v1.2.3