mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-07-12 02:01:36 +00:00
refactor: use default member initializers
- move constant constructor initializers into in-class default member initializers - clang-tidy modernize-use-default-member-init https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html
This commit is contained in:
committed by
Dennis Klein
parent
4dfe24d411
commit
35d713ebaa
@@ -37,7 +37,6 @@ class Context
|
||||
Context(int numIoThreads)
|
||||
: fZmqCtx(zmq_ctx_new())
|
||||
, fInterrupted(false)
|
||||
, fRegionCounter(1)
|
||||
{
|
||||
if (!fZmqCtx) {
|
||||
throw ContextError(tools::ToString("failed creating context, reason: ", zmq_strerror(errno)));
|
||||
@@ -180,7 +179,7 @@ class Context
|
||||
mutable std::mutex fMtx;
|
||||
std::atomic<bool> fInterrupted;
|
||||
|
||||
uint16_t fRegionCounter;
|
||||
uint16_t fRegionCounter{1};
|
||||
std::condition_variable fRegionEventsCV;
|
||||
std::vector<RegionInfo> fRegionInfos;
|
||||
std::queue<RegionInfo> fRegionEvents;
|
||||
|
||||
@@ -41,8 +41,7 @@ class Socket final : public fair::mq::Socket
|
||||
, fBytesRx(0)
|
||||
, fMessagesTx(0)
|
||||
, fMessagesRx(0)
|
||||
, fTimeout(100)
|
||||
, fConnectedPeersCount(0)
|
||||
|
||||
{
|
||||
if (fSocket == nullptr) {
|
||||
LOG(error) << "Failed creating socket " << fId << ", reason: " << zmq_strerror(errno);
|
||||
@@ -405,8 +404,8 @@ class Socket final : public fair::mq::Socket
|
||||
std::atomic<unsigned long> fMessagesTx;
|
||||
std::atomic<unsigned long> fMessagesRx;
|
||||
|
||||
int fTimeout;
|
||||
mutable unsigned long fConnectedPeersCount;
|
||||
int fTimeout{100};
|
||||
mutable unsigned long fConnectedPeersCount{0};
|
||||
};
|
||||
|
||||
} // namespace fair::mq::zmq
|
||||
|
||||
Reference in New Issue
Block a user