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 920785d..8f3bcdd 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 de7be1c..08ba167 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);