Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 09:03:35 +0000 (09:03 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Dec 2011 09:03:35 +0000 (09:03 +0000)
TTherminator/Therminator/ReadPar.cxx
TTherminator/Therminator/ReadPar.h

index 920785d30a2cc16441e439e0e6d5d85dce2511e2..8f3bcdd686fef1dc93700f54776b9f3a63c1a00e 100644 (file)
@@ -43,6 +43,12 @@ ReadPar::ReadPar(const char *aFName)
   readFile(aFName);
 }
 
+ReadPar::ReadPar(const ReadPar &aPar)
+{
+  fname = strdup(aPar.fname);
+  readFile(fname);
+}
+
 ReadPar::~ReadPar()
 {
   if (fname)
index de7be1cbbc71b734644534e775e6d2af5cebc0f3..08ba167e60f6c668d2b568b0dac429a3dbdf0f75 100644 (file)
@@ -57,6 +57,7 @@ class ReadPar
  public:
   ReadPar(); // Default constructor
   ReadPar(const char *aFName);
+  ReadPar(const ReadPar &aPar);
   ~ReadPar();
   
   int readFile(const char *aFName) throw(int);