summaryrefslogtreecommitdiff
path: root/gr-network/lib/udp_source_impl.cc
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2021-01-18 12:42:33 +0100
committerMarcus Müller <marcus@hostalia.de>2021-01-19 12:21:46 +0100
commitd1ba72a0fe5e8deabc6f94cd7bf97a030438c7ee (patch)
tree4971b9715934c0fe1f5d23c7de1a925a2b8af7f5 /gr-network/lib/udp_source_impl.cc
parent3c5b6181d62110bd78628ad356ac03f69ce0c5b0 (diff)
clang-tidy: run full .clang-tidy on C++17 codebase
run /usr/share/clang/run-clang-tidy.py -checks=file '-header-filter=.*' -fix .. from build directory. Then, clang-format -i $(git diff --name-only origin/master) to clang-format changed files. Then, refresh all header hashes in pybind bindings (*/python/bindings/*.cc) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gr-network/lib/udp_source_impl.cc')
-rw-r--r--gr-network/lib/udp_source_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-network/lib/udp_source_impl.cc b/gr-network/lib/udp_source_impl.cc
index 3b89e87bea..1c1aec4177 100644
--- a/gr-network/lib/udp_source_impl.cc
+++ b/gr-network/lib/udp_source_impl.cc
@@ -224,7 +224,7 @@ int udp_source_impl::work(int noutput_items,
unsigned int num_requested = noutput_items * d_block_size;
// quick exit if nothing to do
- if ((bytes_available == 0) && (d_localqueue->size() == 0)) {
+ if ((bytes_available == 0) && (d_localqueue->empty())) {
underrun_counter++;
d_partial_frame_counter = 0;
if (d_source_zeros) {
@@ -288,7 +288,7 @@ int udp_source_impl::work(int noutput_items,
// This is just a safety to clear in the case there's a hanging partial
// packet. If we've lingered through a number of calls and we still don't
// have any data, clear the stale data.
- while (d_localqueue->size() > 0)
+ while (!d_localqueue->empty())
d_localqueue->pop_front();
d_partial_frame_counter = 0;