diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-28 19:56:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-28 19:56:59 +0100 |
commit | b1c1a1a78186aa2d90378ebf15d779077c4a182f (patch) | |
tree | 71886dc4135ef23c72365669e697c2326ef446e3 /api | |
parent | ed2e166f95c1a8b7fde97383520dbd5866b14dab (diff) |
api: kill useless cast
Diffstat (limited to 'api')
-rw-r--r-- | api/plugin-support.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<typename t> std::shared_ptr<t> make_dylib_instance(const std::shared_ptr<dylib>& lib) { - std::shared_ptr<t> ret; if (lib != nullptr && lib->Constructor) - ret = std::shared_ptr<t>(reinterpret_cast<t*>(reinterpret_cast<module_ctor_t>(lib->Constructor)())); - return ret; + return std::shared_ptr<t>{(t*)lib->Constructor()}; + else + return nullptr; } |