diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-03-09 10:38:42 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-17 15:44:05 -0500 |
commit | 668a04befdc4ec43b2a6e86992c672ef5f8408e0 (patch) | |
tree | 67734ba32968831a5b4ea8dd59b7b2ab52e68d01 /host/lib/transport | |
parent | 19f3c1203a42d9da3d7cb16c881fe2bbdc5ec0ce (diff) | |
download | uhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.tar.gz uhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.tar.bz2 uhd-668a04befdc4ec43b2a6e86992c672ef5f8408e0.zip |
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree
using:
$ find . -name "*.cpp" | sort -u | xargs \
--max-procs 8 --max-args 1 clang-tidy --format-style=file \
--fix -p /path/to/compile_commands.json
Note: This is the same procedure as 107a49c0, but applied to all the new
code since then.
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/dpdk_simple.cpp | 10 | ||||
-rw-r--r-- | host/lib/transport/inline_io_service.cpp | 4 | ||||
-rw-r--r-- | host/lib/transport/offload_io_service.cpp | 2 | ||||
-rw-r--r-- | host/lib/transport/udp_wsa_zero_copy.cpp | 26 |
4 files changed, 21 insertions, 21 deletions
diff --git a/host/lib/transport/dpdk_simple.cpp b/host/lib/transport/dpdk_simple.cpp index d93d73b56..835885cba 100644 --- a/host/lib/transport/dpdk_simple.cpp +++ b/host/lib/transport/dpdk_simple.cpp @@ -74,7 +74,7 @@ public: UHD_LOG_TRACE("DPDK::SIMPLE", "Constructor complete"); } - ~dpdk_simple_impl(void) + ~dpdk_simple_impl(void) override { UHD_LOG_TRACE("DPDK::SIMPLE", "~dpdk_simple_impl(), DPDK port index " << _link->get_port()->get_port_id()); @@ -91,7 +91,7 @@ public: * \param length bytes of data to send * \return number of bytes sent (releases buffer if sent) */ - size_t send(const boost::asio::const_buffer& user_buff) + size_t send(const boost::asio::const_buffer& user_buff) override { // Extract buff and sanity check const size_t nbytes = boost::asio::buffer_size(user_buff); @@ -117,7 +117,7 @@ public: * \param timeout the timeout in seconds * \return the number of bytes received or zero on timeout */ - size_t recv(const boost::asio::mutable_buffer& user_buff, double timeout) + size_t recv(const boost::asio::mutable_buffer& user_buff, double timeout) override { size_t user_buff_size = boost::asio::buffer_size(user_buff); uint8_t* user_data = boost::asio::buffer_cast<uint8_t*>(user_buff); @@ -146,12 +146,12 @@ public: return copy_len; } - std::string get_recv_addr(void) + std::string get_recv_addr(void) override { return dpdk::ipv4_num_to_str(_last_recv_addr); } - std::string get_send_addr(void) + std::string get_send_addr(void) override { return dpdk::ipv4_num_to_str(_link->get_remote_ipv4()); } diff --git a/host/lib/transport/inline_io_service.cpp b/host/lib/transport/inline_io_service.cpp index 11835b285..7eb3072b7 100644 --- a/host/lib/transport/inline_io_service.cpp +++ b/host/lib/transport/inline_io_service.cpp @@ -207,7 +207,7 @@ public: _num_send_frames = num_send_frames; } - ~inline_recv_io() + ~inline_recv_io() override { _io_srv->disconnect_receiver(_data_link.get(), this); if (_fc_link) { @@ -263,7 +263,7 @@ public: _num_send_frames = num_send_frames; } - ~inline_send_io() + ~inline_send_io() override { _io_srv->disconnect_sender(_send_link.get()); if (_recv_link) { diff --git a/host/lib/transport/offload_io_service.cpp b/host/lib/transport/offload_io_service.cpp index 32811cbc0..706841f86 100644 --- a/host/lib/transport/offload_io_service.cpp +++ b/host/lib/transport/offload_io_service.cpp @@ -257,7 +257,7 @@ public: offload_io_service_impl( io_service::sptr io_srv, const offload_io_service::params_t& params); - ~offload_io_service_impl(); + ~offload_io_service_impl() override; void attach_recv_link(recv_link_if::sptr link) override; void attach_send_link(send_link_if::sptr link) override; diff --git a/host/lib/transport/udp_wsa_zero_copy.cpp b/host/lib/transport/udp_wsa_zero_copy.cpp index b4880478a..55773296f 100644 --- a/host/lib/transport/udp_wsa_zero_copy.cpp +++ b/host/lib/transport/udp_wsa_zero_copy.cpp @@ -91,12 +91,12 @@ public: this->release(); // makes buffer available via get_new } - ~udp_zero_copy_asio_mrb(void) + ~udp_zero_copy_asio_mrb(void) override { WSACloseEvent(_overlapped.hEvent); } - void release(void) + void release(void) override { _wsa_buff.len = _frame_size; _flags = 0; @@ -143,12 +143,12 @@ public: WSASetEvent(_overlapped.hEvent); // makes buffer available via get_new } - ~udp_zero_copy_asio_msb(void) + ~udp_zero_copy_asio_msb(void) override { WSACloseEvent(_overlapped.hEvent); } - void release(void) + void release(void) override { _wsa_buff.len = size(); WSASend(_sock_fd, &_wsa_buff, 1, NULL, 0, &_overlapped, NULL); @@ -284,7 +284,7 @@ public: } } - ~udp_zero_copy_wsa_impl(void) + ~udp_zero_copy_wsa_impl(void) override { closesocket(_sock_fd); } @@ -293,18 +293,18 @@ public: * Receive implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_recv_buffer::sptr get_recv_buff(double timeout) + managed_recv_buffer::sptr get_recv_buff(double timeout) override { if (_next_recv_buff_index == _num_recv_frames) _next_recv_buff_index = 0; return _mrb_pool[_next_recv_buff_index]->get_new(timeout, _next_recv_buff_index); } - size_t get_num_recv_frames(void) const + size_t get_num_recv_frames(void) const override { return _num_recv_frames; } - size_t get_recv_frame_size(void) const + size_t get_recv_frame_size(void) const override { return _recv_frame_size; } @@ -313,23 +313,23 @@ public: * Send implementation: * Block on the managed buffer's get call and advance the index. ******************************************************************/ - managed_send_buffer::sptr get_send_buff(double timeout) + managed_send_buffer::sptr get_send_buff(double timeout) override { if (_next_send_buff_index == _num_send_frames) _next_send_buff_index = 0; return _msb_pool[_next_send_buff_index]->get_new(timeout, _next_send_buff_index); } - size_t get_num_send_frames(void) const + size_t get_num_send_frames(void) const override { return _num_send_frames; } - size_t get_send_frame_size(void) const + size_t get_send_frame_size(void) const override { return _send_frame_size; } - uint16_t get_local_port(void) const + uint16_t get_local_port(void) const override { struct sockaddr_in addr_info; int addr_len = sizeof(addr_info); @@ -340,7 +340,7 @@ public: return local_port; } - std::string get_local_addr(void) const + std::string get_local_addr(void) const override { // Behold the beauty of winsock struct sockaddr_in addr_info; |