From: akisiel Date: Tue, 20 Dec 2011 14:00:31 +0000 (+0000) Subject: Fix Coverity X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=93996950b650584b2aa5fccf932da83252349dc7;hp=65d1e3cc790d6b5160e909827e80c1e8ba7540a9 Fix Coverity --- diff --git a/TTherminator/Therminator/DecayChannel.cxx b/TTherminator/Therminator/DecayChannel.cxx index de8becd2d8d..b4a535d7ffc 100644 --- a/TTherminator/Therminator/DecayChannel.cxx +++ b/TTherminator/Therminator/DecayChannel.cxx @@ -48,6 +48,18 @@ DecayChannel::~DecayChannel() { } +DecayChannel& DecayChannel::operator=(const DecayChannel& aChannel) +{ + if (this != &aChannel) { + mBranchRatio = aChannel.GetBranchingRatio(); + mParticleType1 = aChannel.GetParticle1(); + mParticleType2 = aChannel.GetParticle2(); + mParticleType3 = aChannel.GetParticle3(); + } + + return *this; +} + int DecayChannel::GetParticle1() const { diff --git a/TTherminator/Therminator/DecayChannel.h b/TTherminator/Therminator/DecayChannel.h index 0ca744eec3b..c39c40e7a25 100644 --- a/TTherminator/Therminator/DecayChannel.h +++ b/TTherminator/Therminator/DecayChannel.h @@ -36,6 +36,7 @@ class DecayChannel DecayChannel(double aBranchRatio, int aPartType1, int aPartType2, int aPartType3 = -1); DecayChannel(const DecayChannel& aChannel); ~DecayChannel(); + DecayChannel& operator=(const DecayChannel& aChannel); int GetParticle1() const; int GetParticle2() const;