diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 09:33:36 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:07:26 -0600 |
commit | 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch) | |
tree | fdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/transport/udp_simple.cpp | |
parent | 7d5e48032baa62cbe7467833b9e057900602f4b9 (diff) | |
download | uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2 uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.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
Diffstat (limited to 'host/lib/transport/udp_simple.cpp')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index e10dff7f8..c83e72d03 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -44,14 +44,14 @@ public: _socket->connect(_send_endpoint); } - size_t send(const asio::const_buffer& buff) + size_t send(const asio::const_buffer& buff) override { if (_connected) return _socket->send(asio::buffer(buff)); return _socket->send_to(asio::buffer(buff), _send_endpoint); } - size_t recv(const asio::mutable_buffer& buff, double timeout) + size_t recv(const asio::mutable_buffer& buff, double timeout) override { const int32_t timeout_ms = static_cast<int32_t>(timeout * 1000); @@ -60,12 +60,12 @@ public: return _socket->receive_from(asio::buffer(buff), _recv_endpoint); } - std::string get_recv_addr(void) + std::string get_recv_addr(void) override { return _recv_endpoint.address().to_string(); } - std::string get_send_addr(void) + std::string get_send_addr(void) override { return _send_endpoint.address().to_string(); } @@ -113,12 +113,12 @@ public: this->write_uart(""); // send an empty packet to init } - void write_uart(const std::string& buf) + void write_uart(const std::string& buf) override { _udp->send(asio::buffer(buf)); } - std::string read_uart(double timeout) + std::string read_uart(double timeout) override { std::string line; const boost::system_time exit_time = |