diff options
Diffstat (limited to 'include/gnuradio/element.hpp')
-rw-r--r-- | include/gnuradio/element.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/gnuradio/element.hpp b/include/gnuradio/element.hpp index 0deee5c..71dc359 100644 --- a/include/gnuradio/element.hpp +++ b/include/gnuradio/element.hpp @@ -37,9 +37,10 @@ struct GR_RUNTIME_API Element : boost::shared_ptr<ElementImpl> * Good for that factory function/shared ptr paradigm. */ template <typename T> - Element(const boost::shared_ptr<T> &elem): - boost::shared_ptr<ElementImpl>(*reinterpret_cast<const Element*>(elem.get())) - { } + Element(const boost::shared_ptr<T> &elem) + { + *this = *elem; + } long unique_id(void) const; |