From 09d47168b142c0509ba401c459d4804564b1ebe4 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 22 Nov 2016 18:16:31 -0800 Subject: 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. --- host/lib/rfnoc/legacy_compat.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'host/lib') 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 @@ -112,6 +102,7 @@ static void recreate_property(const uhd::fs_path &path, uhd::property_tree::sptr tree->remove(path); tree->create(path).set(temp); } + /************************************************************************ * Class Definition ***********************************************************************/ @@ -532,10 +523,10 @@ private: // methods ) ; _tree->create(rx_dsp_base_path / "freq/value") - .set_publisher(boost::bind(&lambda_const_double, 0.0)) + .set_publisher([](){ return 0.0; }) ; _tree->create(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(tx_dsp_base_path / "freq/value") - .set_publisher(boost::bind(&lambda_const_double, 0.0)) + .set_publisher([](){ return 0.0; }) ; _tree->create(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); }) ; } } -- cgit v1.2.3