aboutsummaryrefslogtreecommitdiffstats
path: root/gr-zeromq
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-zeromq
parentclang-tidy: add modernize-deprecated-header (diff)
downloadgnuradio-d1ba72a0fe5e8deabc6f94cd7bf97a030438c7ee.tar.xz
gnuradio-d1ba72a0fe5e8deabc6f94cd7bf97a030438c7ee.zip
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-zeromq')
-rw-r--r--gr-zeromq/lib/base_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-zeromq/lib/base_impl.cc b/gr-zeromq/lib/base_impl.cc
index 6b573211d..e6bddc603 100644
--- a/gr-zeromq/lib/base_impl.cc
+++ b/gr-zeromq/lib/base_impl.cc
@@ -88,7 +88,7 @@ int base_sink_impl::send_message(const void* in_buf,
const uint64_t in_offset)
{
/* Send key if it exists */
- if (d_key.size() > 0) {
+ if (!d_key.empty()) {
zmq::message_t key_message(d_key.size());
memcpy(key_message.data(), d_key.data(), d_key.size());
#if USE_NEW_CPPZMQ_SEND_RECV
@@ -217,7 +217,7 @@ bool base_source_impl::load_message(bool wait)
/* Throw away key and get the first message. Avoid blocking if a multi-part
* message is not sent */
- if (d_key.size() > 0 && !more) {
+ if (!d_key.empty() && !more) {
int64_t is_multipart;
d_socket.getsockopt(ZMQ_RCVMORE, &is_multipart, &more_len);