Problem: inconsistent local variable naming

Solution: configured clang-tidy check and applied fixes
This commit is contained in:
Simon Giesecke 2018-05-25 22:41:05 +02:00
parent c581f43c97
commit 1432011277
7 changed files with 32 additions and 32 deletions

View File

@ -257,18 +257,18 @@ CheckOptions:
# value: ''
# - key: readability-identifier-naming.InlineNamespaceSuffix
# value: ''
# - key: readability-identifier-naming.LocalConstantCase
# value: aNy_CasE
# - key: readability-identifier-naming.LocalConstantPrefix
# value: ''
# - key: readability-identifier-naming.LocalConstantSuffix
# value: ''
# - key: readability-identifier-naming.LocalVariableCase
# value: aNy_CasE
# - key: readability-identifier-naming.LocalVariablePrefix
# value: ''
# - key: readability-identifier-naming.LocalVariableSuffix
# value: ''
- key: readability-identifier-naming.LocalConstantCase
value: lower_case
- key: readability-identifier-naming.LocalConstantPrefix
value: ''
- key: readability-identifier-naming.LocalConstantSuffix
value: ''
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.LocalVariablePrefix
value: ''
- key: readability-identifier-naming.LocalVariableSuffix
value: ''
# - key: readability-identifier-naming.MemberCase
# value: aNy_CasE
# - key: readability-identifier-naming.MemberPrefix

View File

@ -141,8 +141,8 @@ uint64_t zmq::clock_t::now_us ()
#if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
LARGE_INTEGER ticks_per_second;
QueryPerformanceFrequency (&ticks_per_second);
// What time is it?
LARGE_INTEGER tick;
@ -150,7 +150,7 @@ uint64_t zmq::clock_t::now_us ()
// Convert the tick number into the number of seconds
// 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);
#elif defined HAVE_CLOCK_GETTIME \

View File

@ -136,7 +136,7 @@ int zmq::ctx_t::terminate ()
{
slot_sync.lock ();
bool saveTerminating = terminating;
bool save_terminating = terminating;
terminating = false;
// Connect up any pending inproc connections, otherwise we will hang
@ -149,7 +149,7 @@ int zmq::ctx_t::terminate ()
s->bind (p->first.c_str ());
s->close ();
}
terminating = saveTerminating;
terminating = save_terminating;
if (!starting) {
#ifdef HAVE_FORK

View File

@ -51,17 +51,17 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
zmq_assert (pipe_);
if (probe_router) {
msg_t probe_msg_;
int rc = probe_msg_.init ();
msg_t probe_msg;
int rc = probe_msg.init ();
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.
(void) rc;
pipe_->flush ();
rc = probe_msg_.close ();
rc = probe_msg.close ();
errno_assert (rc == 0);
}

View File

@ -76,15 +76,15 @@ void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
zmq_assert (pipe_);
if (probe_router) {
msg_t probe_msg_;
int rc = probe_msg_.init ();
msg_t probe_msg;
int rc = probe_msg.init ();
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.
pipe_->flush ();
rc = probe_msg_.close ();
rc = probe_msg.close ();
errno_assert (rc == 0);
}

View File

@ -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
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,
sizeof sio_loopback_fastpath, NULL, 0,
&numberOfBytesReturned, 0, 0);
&number_of_bytes_returned, 0, 0);
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.
} else {
wsa_assert (false);

View File

@ -90,9 +90,9 @@ void *zmq_threadstart (zmq_thread_fn *func_, void *arg_)
void zmq_threadclose (void *thread_)
{
zmq::thread_t *pThread = static_cast<zmq::thread_t *> (thread_);
pThread->stop ();
LIBZMQ_DELETE (pThread);
zmq::thread_t *p_thread = static_cast<zmq::thread_t *> (thread_);
p_thread->stop ();
LIBZMQ_DELETE (p_thread);
}
// Z85 codec, taken from 0MQ RFC project, implements RFC32 Z85 encoding