# HG changeset patch # User Chris Cannam # Date 1539339129 -3600 # Node ID 9a044706ab7344e898569d6b1fff8b166769c8c6 # Parent 853aeab95acfcc6c9a6adfd5c817f4f552e06e06 Comments on dubiousness of all this diff -r 853aeab95acf -r 9a044706ab73 vamp-support/PreservingPluginHandleMapper.h --- a/vamp-support/PreservingPluginHandleMapper.h Tue Oct 02 11:56:46 2018 +0100 +++ b/vamp-support/PreservingPluginHandleMapper.h Fri Oct 12 11:12:09 2018 +0100 @@ -44,7 +44,8 @@ //!!! document -- this is a passthrough thing for a single plugin //!!! handle only, it does not use actually valid Plugin pointers at -//!!! all +//!!! all. Or, better, reimplement in a way that doesn't involve +//!!! such alarmingly invalid reinterpret_casts class PreservingPluginHandleMapper : public PluginHandleMapper { @@ -69,6 +70,7 @@ virtual Vamp::Plugin *handleToPlugin(Handle h) const noexcept { if (h == INVALID_HANDLE) return nullptr; m_handle = h; + //!!! see comment at top m_plugin = reinterpret_cast(h); return m_plugin; }