From adbe1a0efe7598a9e0433675e2852aad2e280c62 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 29 Jun 2011 10:54:28 -0700 Subject: uhd: loopback working on usrp2 --- host/include/uhd/property_tree.ipp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/property_tree.ipp b/host/include/uhd/property_tree.ipp index 1c61d4937..3dba6fb28 100644 --- a/host/include/uhd/property_tree.ipp +++ b/host/include/uhd/property_tree.ipp @@ -19,7 +19,6 @@ #define INCLUDED_UHD_PROPERTY_TREE_IPP #include -#include #include /*********************************************************************** @@ -51,23 +50,22 @@ public: } property &set(const T &value){ - T new_value(_master.empty()? value : _master(value)); - _value = new_value; //shadow it + _value = boost::shared_ptr(new T(_master.empty()? value : _master(value))); BOOST_FOREACH(typename property::subscriber_type &subscriber, _subscribers){ - subscriber(new_value); //let errors propagate + subscriber(*_value); //let errors propagate } return *this; } T get(void) const{ - return _publisher.empty()? boost::any_cast(_value) : _publisher(); + return _publisher.empty()? *_value : _publisher(); } private: std::vector::subscriber_type> _subscribers; typename property::publisher_type _publisher; typename property::master_type _master; - boost::any _value; //any type so we can assign structs w/ const members + boost::shared_ptr _value; }; }} //namespace uhd::/*anon*/ -- cgit v1.2.3