Skip to content

Commit 54e38cb

Browse files
committed
[HF] Fix warning about assignment operator.
rootbench used the implicit Channel::operator=. This triggers a warning because there is a user-declared copy constructor. By defaulting the two, this can be avoided.
1 parent e98b3b5 commit 54e38cb

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

roofit/histfactory/inc/RooStats/HistFactory/Channel.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class Channel {
3434
friend class Measurement;
3535

3636
Channel();
37-
Channel(const Channel& other);
37+
Channel(const Channel& other) = default;
38+
Channel & operator=(const Channel& other) = default;
3839
Channel(std::string Name, std::string InputFile="");
3940

4041
/// set name of channel

roofit/histfactory/src/Channel.cxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ RooStats::HistFactory::Channel::Channel() :
3838
// standard constructor
3939
}
4040

41-
RooStats::HistFactory::Channel::Channel(const Channel& other) :
42-
fName( other.fName ),
43-
fInputFile( other.fInputFile ),
44-
fHistoPath( other.fHistoPath ),
45-
fData( other.fData ),
46-
fAdditionalData( other.fAdditionalData ),
47-
fStatErrorConfig( other.fStatErrorConfig ),
48-
fSamples( other.fSamples )
49-
{ ; }
50-
51-
5241
RooStats::HistFactory::Channel::Channel(std::string ChanName, std::string ChanInputFile) :
5342
fName( ChanName ), fInputFile( ChanInputFile )
5443
{

0 commit comments

Comments
 (0)