From 9b62c5969f04f47b58168419617f0632a155fd4e Mon Sep 17 00:00:00 2001 From: morsch Date: Mon, 4 Aug 2003 10:04:44 +0000 Subject: [PATCH] Code causing warning messages corrected. --- STEER/AliModule.h | 2 +- STRUCT/AliALIFE.cxx | 12 ++++++++++-- STRUCT/AliALIFE.h | 15 +++++++-------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/STEER/AliModule.h b/STEER/AliModule.h index ce7efac4296..d0ce153451f 100644 --- a/STEER/AliModule.h +++ b/STEER/AliModule.h @@ -100,7 +100,7 @@ public: - virtual void MakeBranch(Option_t * opt =" ") {} + virtual void MakeBranch(Option_t * /*opt =" "*/) {} virtual void MakeTree(Option_t *) {}//skowron virtual AliLoader* MakeLoader(const char* topfoldername);//skowron diff --git a/STRUCT/AliALIFE.cxx b/STRUCT/AliALIFE.cxx index 18bb5480e15..63c1954f0b8 100644 --- a/STRUCT/AliALIFE.cxx +++ b/STRUCT/AliALIFE.cxx @@ -25,7 +25,8 @@ ClassImp(AliALIFE) - AliALIFE::AliALIFE(const char* file1, const char* file2) + +AliALIFE::AliALIFE(const char* file1, const char* file2) { // Constructor fNBodies = 0; @@ -40,7 +41,7 @@ ClassImp(AliALIFE) fDefaultVolume2 = "DEFAU2"; } - AliALIFE::AliALIFE() +AliALIFE::AliALIFE() { // Default constructor fBodyFile = "FlukaBody.inp"; @@ -441,6 +442,13 @@ void AliALIFE::Finish() fclose(fFile2); } +void AliALIFE::Copy(AliALIFE&) const +{ + // + // Copy + // + Fatal("Copy","Not implemented!\n"); +} diff --git a/STRUCT/AliALIFE.h b/STRUCT/AliALIFE.h index cbda6ec48e3..9216fb56494 100644 --- a/STRUCT/AliALIFE.h +++ b/STRUCT/AliALIFE.h @@ -12,9 +12,8 @@ class AliALIFE : public TObject { public: AliALIFE(const char *name1, const char *name2); AliALIFE(); - AliALIFE(const AliALIFE &rh) { - // copy ctor requested by coding convention but not needed - Fatal("Copy constructor","not implemented"); + AliALIFE(const AliALIFE &rhs) : TObject(rhs) { + rhs.Copy(*this); } virtual ~AliALIFE() {} void Cylinder(Float_t rmin, Float_t rmax, @@ -66,12 +65,12 @@ class AliALIFE : public TObject { private: void BodyHeader(); void VolumeHeader(); - AliALIFE & operator = (const AliALIFE &) { - // assignement operator requested by coding convention but not needed - return *this; - } - + void Copy(AliALIFE &alife) const; + AliALIFE & operator = (const AliALIFE &rhs) { + rhs.Copy(*this); + return (*this); + } ClassDef(AliALIFE,1) }; #endif -- 2.39.3