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/udp_wsa_zero_copy.cpp | |
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/udp_wsa_zero_copy.cpp')
-rw-r--r-- | host/lib/transport/udp_wsa_zero_copy.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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; |