From 188fbb17cfd18c87f60ec56f62476f97ef2779bb Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 19 Jun 2021 00:06:52 +0200 Subject: uhd: Remove all occurences of boost::math::*round() Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy. --- host/examples/tx_waveforms.cpp | 4 ++-- host/examples/txrx_loopback_to_file.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'host/examples') diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 53de799be..58f1a6885 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -14,9 +14,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -141,7 +141,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) // pre-compute the waveform values const wave_table_class wave_table(wave_type, ampl); const size_t step = - boost::math::iround(wave_freq / usrp->get_tx_rate() * wave_table_len); + std::lround(wave_freq / usrp->get_tx_rate() * wave_table_len); size_t index = 0; for (size_t ch = 0; ch < channel_nums.size(); ch++) { diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 39af6401b..0dc489063 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -15,9 +15,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -438,8 +438,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) // pre-compute the waveform values const wave_table_class wave_table(wave_type, ampl); - const size_t step = - boost::math::iround(wave_freq / tx_usrp->get_tx_rate() * wave_table_len); + const size_t step = std::lround(wave_freq / tx_usrp->get_tx_rate() * wave_table_len); size_t index = 0; // create a transmit streamer -- cgit v1.2.3