Skip to content
Snippets Groups Projects
Commit d0fd3503 authored by Scott Snyder's avatar Scott Snyder Committed by Tadej Novak
Browse files

TBEvent: Fix cppheck warnings.

TBEvent: Fix cppheck warnings.

Pass strings by const reference, not by value.
parent f293f74a
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TBEVENT_TBTAILCATCHER_H
......@@ -57,7 +57,7 @@ class TBTailCatcher : public TBBeamDetector,
/////////////////
const std::vector<signal_type>& getSignals() const;
signal_type getSignal(std::string thisScintName) const;
signal_type getSignal(const std::string& thisScintName) const;
signal_type getSignal(const TBScintillator* thisScint) const;
private:
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TBEVENT_TBTAILCATCHERRAW_H
......@@ -57,7 +57,7 @@ class TBTailCatcherRaw : public TBBeamDetector,
/////////////////
const std::vector<signal_type>& getSignals() const;
signal_type getSignal(std::string thisScintName) const;
signal_type getSignal(const std::string& thisScintName) const;
signal_type getSignal(const TBScintillatorRaw* thisScint) const;
private:
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
......@@ -61,7 +61,7 @@ const std::vector<double>& TBTailCatcher::getSignals() const
}
double
TBTailCatcher::getSignal(std::string thisScintName) const
TBTailCatcher::getSignal(const std::string& thisScintName) const
{
return ( this->findIndex(thisScintName) < m_signals.size() )
? m_signals[this->findIndex(thisScintName)]
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
......@@ -60,7 +60,7 @@ const std::vector<int>& TBTailCatcherRaw::getSignals() const
}
int
TBTailCatcherRaw::getSignal(std::string thisScintName) const
TBTailCatcherRaw::getSignal(const std::string& thisScintName) const
{
return ( this->findIndex(thisScintName) < m_signals.size() )
? m_signals[this->findIndex(thisScintName)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment