Index: trunk/source/materials/include/G4Material.hh
===================================================================
--- trunk/source/materials/include/G4Material.hh	(revision 850)
+++ trunk/source/materials/include/G4Material.hh	(revision 921)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4Material.hh,v 1.26 2008/08/13 16:06:42 vnivanch Exp $
-// GEANT4 tag $Name: HEAD $
+// $Id: G4Material.hh,v 1.27 2008/11/14 15:14:24 gcosmo Exp $
+// GEANT4 tag $Name: geant4-09-02-cand-01 $
 //
 
@@ -103,5 +103,5 @@
 class G4Material
 {
-public:  // with description
+ public:  // with description
 
   //
@@ -145,58 +145,57 @@
   virtual ~G4Material();
   
-  void SetChemicalFormula(const G4String& chF) {fChemicalFormula=chF;};
-                          
+  void SetChemicalFormula (const G4String& chF) {fChemicalFormula=chF;}
+
   //
   // retrieval methods
   // 
-  G4String GetName()            const {return fName;};
-  G4String GetChemicalFormula() const {return fChemicalFormula;};
-  G4double GetDensity()         const {return fDensity;};
-
-  G4State  GetState()       const {return fState;};
-  G4double GetTemperature() const {return fTemp;};
-  G4double GetPressure()    const {return fPressure;};
+  const G4String& GetName()            const {return fName;}
+  const G4String& GetChemicalFormula() const {return fChemicalFormula;}
+  G4double GetDensity()     const {return fDensity;}
+  G4State  GetState()       const {return fState;}
+  G4double GetTemperature() const {return fTemp;}
+  G4double GetPressure()    const {return fPressure;}
     
   //number of elements constituing this material:    
-  size_t GetNumberOfElements()         const {return fNumberOfElements;};
+  size_t GetNumberOfElements()         const {return fNumberOfElements;}
     
   //vector of pointers to elements constituing this material:          
   const
-  G4ElementVector* GetElementVector()  const {return theElementVector;};
+  G4ElementVector* GetElementVector()  const {return theElementVector;}
   
   //vector of fractional mass of each element:
-  const  G4double* GetFractionVector() const {return fMassFractionVector;};
+  const  G4double* GetFractionVector() const {return fMassFractionVector;}
     
   //vector of atom count of each element:
-  const  G4int*    GetAtomsVector()    const {return fAtomsVector;};
+  const  G4int*    GetAtomsVector()    const {return fAtomsVector;}
 
   //return a pointer to an element, given its index in the material:
   const 
-  G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];};
+  G4Element* GetElement(G4int iel) const {return (*theElementVector)[iel];}
   
   //vector of nb of atoms per volume of each element in this material:
   const
-  G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;};
+  G4double* GetVecNbOfAtomsPerVolume() const {return VecNbOfAtomsPerVolume;}
   //total number of atoms per volume:
-  G4double  GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;};
+  G4double  GetTotNbOfAtomsPerVolume() const {return TotNbOfAtomsPerVolume;}
   //total number of electrons per volume:
-  G4double  GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;};
+  G4double  GetTotNbOfElectPerVolume() const {return TotNbOfElectPerVolume;}
 
   //obsolete names (5-10-98) see the 2 functions above
   const
-  G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;};
-  G4double  GetElectronDensity()        const {return TotNbOfElectPerVolume;};
+  G4double* GetAtomicNumDensityVector() const {return VecNbOfAtomsPerVolume;}
+  G4double  GetElectronDensity()        const {return TotNbOfElectPerVolume;}
     
   // Radiation length:     
-  G4double         GetRadlen()          const {return fRadlen;};
+  G4double         GetRadlen()          const {return fRadlen;}
     
   // Nuclear interaction length:     
-  G4double GetNuclearInterLength()      const {return fNuclInterLen;};
+  G4double GetNuclearInterLength()      const {return fNuclInterLen;}
         
   // ionisation parameters:
-  G4IonisParamMat* GetIonisation()      const {return fIonisation;};
+  G4IonisParamMat* GetIonisation()      const {return fIonisation;}
   
   // Sandia table:
-  G4SandiaTable*   GetSandiaTable()     const {return fSandiaTable;};
+  G4SandiaTable*   GetSandiaTable()     const {return fSandiaTable;}
   
   //meaningful only for single material:
@@ -206,8 +205,8 @@
   //the MaterialPropertiesTable (if any) attached to this material:
   void SetMaterialPropertiesTable(G4MaterialPropertiesTable* anMPT)
-                                     {fMaterialPropertiesTable = anMPT;};
+                                     {fMaterialPropertiesTable = anMPT;}
   				       
   G4MaterialPropertiesTable* GetMaterialPropertiesTable() const
-                                     {return fMaterialPropertiesTable;};
+                                     {return fMaterialPropertiesTable;}
 
   //the (static) Table of Materials:
@@ -220,5 +219,5 @@
   
   //the index of this material in the Table:    
-  size_t GetIndex() const {return fIndexInTable;};
+  size_t GetIndex() const {return fIndexInTable;}
     
   //return  pointer to a material, given its name:    
@@ -232,5 +231,5 @@
   friend std::ostream& operator<<(std::ostream&, G4MaterialTable);
     
-public:  // without description 
+ public:  // without description 
        
   G4int operator==(const G4Material&) const;
@@ -241,5 +240,7 @@
     // persistifiable objects.
 
-private:
+  void SetName (const G4String& name) {fName=name;}
+
+ private:
 
   G4Material(const G4Material&);
