diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-22 18:16:31 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-12-01 17:15:23 -0800 |
commit | 09d47168b142c0509ba401c459d4804564b1ebe4 (patch) | |
tree | 3a1d4dc8494cbf661cae91c0dec66654b57e1530 /host/lib/rfnoc/legacy_compat.cpp | |
parent | 7c932e0fbb694258d925f170e845334c22fca2f4 (diff) | |
download | uhd-09d47168b142c0509ba401c459d4804564b1ebe4.tar.gz uhd-09d47168b142c0509ba401c459d4804564b1ebe4.tar.bz2 uhd-09d47168b142c0509ba401c459d4804564b1ebe4.zip |
rfnoc: Replaced some simple pseudo-lambdas with actual lambdas.
Note: This is the first commit that uses lambdas, and lambdas are now
usable for UHD development.
Diffstat (limited to 'host/lib/rfnoc/legacy_compat.cpp')
-rw-r--r-- | host/lib/rfnoc/legacy_compat.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp index b660a21c7..18f6c0849 100644 --- a/host/lib/rfnoc/legacy_compat.cpp +++ b/host/lib/rfnoc/legacy_compat.cpp @@ -94,16 +94,6 @@ size_t calc_num_tx_chans_per_radio( ); } -double lambda_const_double(const double d) -{ - return d; -} - -uhd::meta_range_t lambda_const_meta_range(const double start, const double stop, const double step) -{ - return uhd::meta_range_t(start, stop, step); -} - /*! Recreate passed property without bound subscribers. Maintains current property value. */ template <typename T> @@ -112,6 +102,7 @@ static void recreate_property(const uhd::fs_path &path, uhd::property_tree::sptr tree->remove(path); tree->create<T>(path).set(temp); } + /************************************************************************ * Class Definition ***********************************************************************/ @@ -532,10 +523,10 @@ private: // methods ) ; _tree->create<double>(rx_dsp_base_path / "freq/value") - .set_publisher(boost::bind(&lambda_const_double, 0.0)) + .set_publisher([](){ return 0.0; }) ; _tree->create<uhd::meta_range_t>(rx_dsp_base_path / "freq/range") - .set_publisher(boost::bind(&lambda_const_meta_range, 0.0, 0.0, 0.0)) + .set_publisher([](){ return uhd::meta_range_t(0.0, 0.0, 0.0); }) ; } } @@ -579,10 +570,10 @@ private: // methods ) ; _tree->create<double>(tx_dsp_base_path / "freq/value") - .set_publisher(boost::bind(&lambda_const_double, 0.0)) + .set_publisher([](){ return 0.0; }) ; _tree->create<uhd::meta_range_t>(tx_dsp_base_path / "freq/range") - .set_publisher(boost::bind(&lambda_const_meta_range, 0.0, 0.0, 0.0)) + .set_publisher([](){ return uhd::meta_range_t(0.0, 0.0, 0.0); }) ; } } |