diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-06-19 00:06:52 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-06-24 12:00:49 -0500 |
commit | 188fbb17cfd18c87f60ec56f62476f97ef2779bb (patch) | |
tree | e88b9fb8436aa42f3ecbdc0403751a3e68bbbac8 /host/examples/tx_waveforms.cpp | |
parent | 78ec29b6becd53f79a0ae282ae22c38bedb887d1 (diff) | |
download | uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.gz uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.tar.bz2 uhd-188fbb17cfd18c87f60ec56f62476f97ef2779bb.zip |
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.
Diffstat (limited to 'host/examples/tx_waveforms.cpp')
-rw-r--r-- | host/examples/tx_waveforms.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <stdint.h> #include <boost/algorithm/string.hpp> #include <boost/format.hpp> -#include <boost/math/special_functions/round.hpp> #include <boost/program_options.hpp> #include <chrono> +#include <cmath> #include <csignal> #include <iostream> #include <string> @@ -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++) { |