From c221fd1c872c80a1fc2d64be4074f97c2f75c7c7 Mon Sep 17 00:00:00 2001 From: Jim Melton Date: Wed, 17 Feb 2021 12:54:10 -0700 Subject: [PATCH] update copyright and move risky initializer into ctor body --- .../signal_source/adapters/signal_source_base.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/signal_source_base.cc b/src/algorithms/signal_source/adapters/signal_source_base.cc index b3e68d200..9f2230825 100644 --- a/src/algorithms/signal_source/adapters/signal_source_base.cc +++ b/src/algorithms/signal_source/adapters/signal_source_base.cc @@ -9,7 +9,7 @@ * GNSS-SDR is a Global Navigation Satellite System software-defined receiver. * This file is part of GNSS-SDR. * - * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors) + * Copyright (C) 2010-2021 (see AUTHORS file for a list of contributors) * SPDX-License-Identifier: GPL-3.0-or-later * * ----------------------------------------------------------------------------- @@ -38,6 +38,9 @@ size_t SignalSourceBase::getRfChannels() const } SignalSourceBase::SignalSourceBase(ConfigurationInterface const* configuration, std::string role, std::string impl) - : role_(std::move(role)), implementation_(std::move(impl)), rfChannels_(configuration->property(role_ + ".RF_channels"s, 1U)) + : role_(std::move(role)), implementation_(std::move(impl)) { + // because clang-tidy insists on using std::move for the string arguments, and to avoid + // depending on the order of initialization, assign rfChannels_ in the body + rfChannels_ = configuration->property(role_ + ".RF_channels"s, 1U); }