Coverity 18358 solved by non-implemented private copy constructor and assignment...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Feb 2012 09:07:36 +0000 (09:07 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Feb 2012 09:07:36 +0000 (09:07 +0000)
TRIGGER/AliTrigConnector.cxx
TRIGGER/AliTrigConnector.h

index e91df70..6321d11 100644 (file)
@@ -60,27 +60,6 @@ AliTrigConnector::~AliTrigConnector()
   if (fDevices) delete fDevices;
 }
 
-//______________________________________________________________________________
-AliTrigConnector& AliTrigConnector::operator=(const AliTrigConnector &other)
-{
-// Assignment
-  if (&other == this) return *this;
-  TNamed::operator=(other);
-  fFeeder = other.fFeeder;
-  fOutput = other.fOutput;
-  fNclients = other.fNclients;
-  fArraySize = other.fArraySize;
-  fInputs = 0;
-  fDevices = 0;
-  if (fArraySize && other.fInputs) {
-    fInputs = new Int_t[fArraySize];
-    memcpy(fInputs, other.fInputs, fNclients*sizeof(Int_t));
-    fDevices = new TObjArray(fArraySize);
-    for (Int_t i=0; i<fNclients; i++) fDevices->Add(other.fDevices->At(i));
-  }     
-  return *this;
-}
-
 //______________________________________________________________________________
 void AliTrigConnector::Connect(AliTrigDevice *client, Int_t input)
 {
index 6041fc6..3a9699a 100644 (file)
@@ -24,10 +24,8 @@ class AliTrigConnector : public TNamed {
 public:
   AliTrigConnector() : TNamed(), fFeeder(0), fOutput(0), fNclients(0), fArraySize(0), fInputs(0), fDevices(0) {}
   AliTrigConnector(const char *name, AliTrigDevice *feeder, Int_t output) : TNamed(name, ""), fFeeder(feeder), fOutput(output), fNclients(0), fArraySize(0), fInputs(0), fDevices(0) {}
-  AliTrigConnector(const AliTrigConnector &other);
   virtual ~AliTrigConnector();
 
-  AliTrigConnector &operator=(const AliTrigConnector &other);
   
   // Connect a client input.
   void                      Connect(AliTrigDevice *client, Int_t input);
@@ -40,6 +38,9 @@ public:
   Bool_t                    Transmit(AliTrigEvent *event);
   
 private:
+  AliTrigConnector(const AliTrigConnector &other);
+  AliTrigConnector &operator=(const AliTrigConnector &other);
+
   AliTrigDevice            *fFeeder;    // Feeder device
   Int_t                     fOutput;    // Output slot index for the feeder
   Int_t                     fNclients;  // Number of clients