]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 16:16:16 +0000 (16:16 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 16:16:16 +0000 (16:16 +0000)
TTherminator/TTherminator.cxx
TTherminator/TTherminator.h

index 6fb0d961faf67f4e214ce528e0b783cd079ac8f7..59255c09dcee35f0f7be08a078fa72cb64c159bb 100644 (file)
@@ -59,11 +59,23 @@ TTherminator::TTherminator(const TTherminator & therm) :
   TGenerator(therm),
   fCalka(0),
   fEvent(0),
-  fPartDB(0)
+  fPartDB(new ParticleDB())
 {
   // Copy constructor
-  fPartDB = new ParticleDB();
+  //  fPartDB = new ParticleDB();
 }
+TTherminator& TTherminator::operator=(const TTherminator & therm)
+{
+  if (this != &therm) {
+    fCalka = therm.fCalka;
+    fEvent = therm.fEvent;
+    delete fPartDB;
+    fPartDB = new ParticleDB();
+  }
+
+  return *this;
+}
+
 TTherminator::~TTherminator()
 {
   // Destructor
index 6701a5b4cc14bf303955b8e45c7572a2a7fa6641..e944a693e455af1d7b0ea57d8d2a41dc93d280d1 100644 (file)
@@ -45,6 +45,7 @@ class TTherminator: public TGenerator {
  public:
   TTherminator();
   TTherminator(const TTherminator & therm);
+  TTherminator& operator=(const TTherminator & therm);
   virtual ~TTherminator();
   
   virtual void        ReadParameters();