mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
use clang-format for FairMQ
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user