Prefer initialization to assignment in constructors

This commit is contained in:
Carles Fernandez 2021-12-14 17:41:18 +01:00
parent 2f04da621d
commit 31592f7eb3
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 8 additions and 7 deletions

View File

@ -22,21 +22,22 @@
#include <utility>
ChannelFsm::ChannelFsm()
: queue_(nullptr),
channel_(0U),
state_(0U)
{
acq_ = nullptr;
trk_ = nullptr;
channel_ = 0U;
state_ = 0U;
queue_ = nullptr;
}
ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition) : acq_(std::move(acquisition))
ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition)
: acq_(std::move(acquisition)),
queue_(nullptr),
channel_(0U),
state_(0U)
{
trk_ = nullptr;
channel_ = 0U;
state_ = 0U;
queue_ = nullptr;
}