From de4d0c0867efee1e81809ce0e4b6c8f7557c958e Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 2 Nov 2018 15:18:17 -0700 Subject: rfnoc: Replace some [] with .at() in radio_ctrl_impl This makes it easier to detect errors in derived classes that expect getters in radio_ctrl_impl to also do error checking. --- host/lib/rfnoc/radio_ctrl_impl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'host/lib') diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 66040f67c..f3d6cd049 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -191,42 +191,42 @@ double radio_ctrl_impl::get_rate() const std::string radio_ctrl_impl::get_tx_antenna(const size_t chan) /* const */ { - return _tx_antenna[chan]; + return _tx_antenna.at(chan); } std::string radio_ctrl_impl::get_rx_antenna(const size_t chan) /* const */ { - return _rx_antenna[chan]; + return _rx_antenna.at(chan); } double radio_ctrl_impl::get_tx_frequency(const size_t chan) /* const */ { - return _tx_freq[chan]; + return _tx_freq.at(chan); } double radio_ctrl_impl::get_rx_frequency(const size_t chan) /* const */ { - return _rx_freq[chan]; + return _rx_freq.at(chan); } double radio_ctrl_impl::get_tx_gain(const size_t chan) /* const */ { - return _tx_gain[chan]; + return _tx_gain.at(chan); } double radio_ctrl_impl::get_rx_gain(const size_t chan) /* const */ { - return _rx_gain[chan]; + return _rx_gain.at(chan); } double radio_ctrl_impl::get_tx_bandwidth(const size_t chan) /* const */ { - return _tx_bandwidth[chan]; + return _tx_bandwidth.at(chan); } double radio_ctrl_impl::get_rx_bandwidth(const size_t chan) /* const */ { - return _rx_bandwidth[chan]; + return _rx_bandwidth.at(chan); } /****************************************************************************** -- cgit v1.2.3