Commit 14320112 authored by Simon Giesecke's avatar Simon Giesecke

Problem: inconsistent local variable naming

Solution: configured clang-tidy check and applied fixes
parent c581f43c
...@@ -257,18 +257,18 @@ CheckOptions: ...@@ -257,18 +257,18 @@ CheckOptions:
# value: '' # value: ''
# - key: readability-identifier-naming.InlineNamespaceSuffix # - key: readability-identifier-naming.InlineNamespaceSuffix
# value: '' # value: ''
# - key: readability-identifier-naming.LocalConstantCase - key: readability-identifier-naming.LocalConstantCase
# value: aNy_CasE value: lower_case
# - key: readability-identifier-naming.LocalConstantPrefix - key: readability-identifier-naming.LocalConstantPrefix
# value: '' value: ''
# - key: readability-identifier-naming.LocalConstantSuffix - key: readability-identifier-naming.LocalConstantSuffix
# value: '' value: ''
# - key: readability-identifier-naming.LocalVariableCase - key: readability-identifier-naming.LocalVariableCase
# value: aNy_CasE value: lower_case
# - key: readability-identifier-naming.LocalVariablePrefix - key: readability-identifier-naming.LocalVariablePrefix
# value: '' value: ''
# - key: readability-identifier-naming.LocalVariableSuffix - key: readability-identifier-naming.LocalVariableSuffix
# value: '' value: ''
# - key: readability-identifier-naming.MemberCase # - key: readability-identifier-naming.MemberCase
# value: aNy_CasE # value: aNy_CasE
# - key: readability-identifier-naming.MemberPrefix # - key: readability-identifier-naming.MemberPrefix
......
...@@ -141,8 +141,8 @@ uint64_t zmq::clock_t::now_us () ...@@ -141,8 +141,8 @@ uint64_t zmq::clock_t::now_us ()
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy. // Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond; LARGE_INTEGER ticks_per_second;
QueryPerformanceFrequency (&ticksPerSecond); QueryPerformanceFrequency (&ticks_per_second);
// What time is it? // What time is it?
LARGE_INTEGER tick; LARGE_INTEGER tick;
...@@ -150,7 +150,7 @@ uint64_t zmq::clock_t::now_us () ...@@ -150,7 +150,7 @@ uint64_t zmq::clock_t::now_us ()
// Convert the tick number into the number of seconds // Convert the tick number into the number of seconds
// since the system was started. // since the system was started.
double ticks_div = ticksPerSecond.QuadPart / 1000000.0; double ticks_div = ticks_per_second.QuadPart / 1000000.0;
return static_cast<uint64_t> (tick.QuadPart / ticks_div); return static_cast<uint64_t> (tick.QuadPart / ticks_div);
#elif defined HAVE_CLOCK_GETTIME \ #elif defined HAVE_CLOCK_GETTIME \
......
...@@ -136,7 +136,7 @@ int zmq::ctx_t::terminate () ...@@ -136,7 +136,7 @@ int zmq::ctx_t::terminate ()
{ {
slot_sync.lock (); slot_sync.lock ();
bool saveTerminating = terminating; bool save_terminating = terminating;
terminating = false; terminating = false;
// Connect up any pending inproc connections, otherwise we will hang // Connect up any pending inproc connections, otherwise we will hang
...@@ -149,7 +149,7 @@ int zmq::ctx_t::terminate () ...@@ -149,7 +149,7 @@ int zmq::ctx_t::terminate ()
s->bind (p->first.c_str ()); s->bind (p->first.c_str ());
s->close (); s->close ();
} }
terminating = saveTerminating; terminating = save_terminating;
if (!starting) { if (!starting) {
#ifdef HAVE_FORK #ifdef HAVE_FORK
......
...@@ -51,17 +51,17 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) ...@@ -51,17 +51,17 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
zmq_assert (pipe_); zmq_assert (pipe_);
if (probe_router) { if (probe_router) {
msg_t probe_msg_; msg_t probe_msg;
int rc = probe_msg_.init (); int rc = probe_msg.init ();
errno_assert (rc == 0); errno_assert (rc == 0);
rc = pipe_->write (&probe_msg_); rc = pipe_->write (&probe_msg);
// zmq_assert (rc) is not applicable here, since it is not a bug. // zmq_assert (rc) is not applicable here, since it is not a bug.
(void) rc; (void) rc;
pipe_->flush (); pipe_->flush ();
rc = probe_msg_.close (); rc = probe_msg.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
} }
......
...@@ -76,15 +76,15 @@ void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) ...@@ -76,15 +76,15 @@ void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
zmq_assert (pipe_); zmq_assert (pipe_);
if (probe_router) { if (probe_router) {
msg_t probe_msg_; msg_t probe_msg;
int rc = probe_msg_.init (); int rc = probe_msg.init ();
errno_assert (rc == 0); errno_assert (rc == 0);
rc = pipe_->write (&probe_msg_); rc = pipe_->write (&probe_msg);
// zmq_assert (rc) is not applicable here, since it is not a bug. // zmq_assert (rc) is not applicable here, since it is not a bug.
pipe_->flush (); pipe_->flush ();
rc = probe_msg_.close (); rc = probe_msg.close ();
errno_assert (rc == 0); errno_assert (rc == 0);
} }
......
...@@ -361,16 +361,16 @@ void zmq::tcp_tune_loopback_fast_path (const fd_t socket_) ...@@ -361,16 +361,16 @@ void zmq::tcp_tune_loopback_fast_path (const fd_t socket_)
{ {
#if defined ZMQ_HAVE_WINDOWS && defined SIO_LOOPBACK_FAST_PATH #if defined ZMQ_HAVE_WINDOWS && defined SIO_LOOPBACK_FAST_PATH
int sio_loopback_fastpath = 1; int sio_loopback_fastpath = 1;
DWORD numberOfBytesReturned = 0; DWORD number_of_bytes_returned = 0;
int rc = WSAIoctl (socket_, SIO_LOOPBACK_FAST_PATH, &sio_loopback_fastpath, int rc = WSAIoctl (socket_, SIO_LOOPBACK_FAST_PATH, &sio_loopback_fastpath,
sizeof sio_loopback_fastpath, NULL, 0, sizeof sio_loopback_fastpath, NULL, 0,
&numberOfBytesReturned, 0, 0); &number_of_bytes_returned, 0, 0);
if (SOCKET_ERROR == rc) { if (SOCKET_ERROR == rc) {
DWORD lastError = ::WSAGetLastError (); DWORD last_error = ::WSAGetLastError ();
if (WSAEOPNOTSUPP == lastError) { if (WSAEOPNOTSUPP == last_error) {
// This system is not Windows 8 or Server 2012, and the call is not supported. // This system is not Windows 8 or Server 2012, and the call is not supported.
} else { } else {
wsa_assert (false); wsa_assert (false);
......
...@@ -90,9 +90,9 @@ void *zmq_threadstart (zmq_thread_fn *func_, void *arg_) ...@@ -90,9 +90,9 @@ void *zmq_threadstart (zmq_thread_fn *func_, void *arg_)
void zmq_threadclose (void *thread_) void zmq_threadclose (void *thread_)
{ {
zmq::thread_t *pThread = static_cast<zmq::thread_t *> (thread_); zmq::thread_t *p_thread = static_cast<zmq::thread_t *> (thread_);
pThread->stop (); p_thread->stop ();
LIBZMQ_DELETE (pThread); LIBZMQ_DELETE (p_thread);
} }
// Z85 codec, taken from 0MQ RFC project, implements RFC32 Z85 encoding // Z85 codec, taken from 0MQ RFC project, implements RFC32 Z85 encoding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment