From 31592f7eb388cbe32eae83ab67700f5699d72c61 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 14 Dec 2021 17:41:18 +0100 Subject: [PATCH] Prefer initialization to assignment in constructors --- src/algorithms/channel/libs/channel_fsm.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/algorithms/channel/libs/channel_fsm.cc b/src/algorithms/channel/libs/channel_fsm.cc index aa2442630..48f001238 100644 --- a/src/algorithms/channel/libs/channel_fsm.cc +++ b/src/algorithms/channel/libs/channel_fsm.cc @@ -22,21 +22,22 @@ #include ChannelFsm::ChannelFsm() + : queue_(nullptr), + channel_(0U), + state_(0U) { acq_ = nullptr; trk_ = nullptr; - channel_ = 0U; - state_ = 0U; - queue_ = nullptr; } -ChannelFsm::ChannelFsm(std::shared_ptr acquisition) : acq_(std::move(acquisition)) +ChannelFsm::ChannelFsm(std::shared_ptr acquisition) + : acq_(std::move(acquisition)), + queue_(nullptr), + channel_(0U), + state_(0U) { trk_ = nullptr; - channel_ = 0U; - state_ = 0U; - queue_ = nullptr; }