use clang-format for FairMQ

This commit is contained in:
Alexey Rybalchenko
2014-04-10 15:20:48 +02:00
parent e80e6d4269
commit 68d51d8ed5
55 changed files with 1893 additions and 1759 deletions

View File

@@ -11,37 +11,41 @@
FairMQContextZMQ::FairMQContextZMQ(int numIoThreads)
{
fContext = zmq_ctx_new ();
if (fContext == NULL){
LOG(ERROR) << "failed creating context, reason: " << zmq_strerror(errno);
}
fContext = zmq_ctx_new();
if (fContext == NULL)
{
LOG(ERROR) << "failed creating context, reason: " << zmq_strerror(errno);
}
int rc = zmq_ctx_set (fContext, ZMQ_IO_THREADS, numIoThreads);
if (rc != 0){
LOG(ERROR) << "failed configuring context, reason: " << zmq_strerror(errno);
}
int rc = zmq_ctx_set(fContext, ZMQ_IO_THREADS, numIoThreads);
if (rc != 0)
{
LOG(ERROR) << "failed configuring context, reason: " << zmq_strerror(errno);
}
}
FairMQContextZMQ::~FairMQContextZMQ()
{
Close();
Close();
}
void* FairMQContextZMQ::GetContext()
{
return fContext;
return fContext;
}
void FairMQContextZMQ::Close()
{
if (fContext == NULL){
return;
}
if (fContext == NULL)
{
return;
}
int rc = zmq_ctx_destroy (fContext);
if (rc != 0) {
LOG(ERROR) << "failed closing context, reason: " << zmq_strerror(errno);
}
int rc = zmq_ctx_destroy(fContext);
if (rc != 0)
{
LOG(ERROR) << "failed closing context, reason: " << zmq_strerror(errno);
}
fContext = NULL;
fContext = NULL;
}