From 6a29d96f0961c343ea7b4d34f6bbbbe2477b42b5 Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Mon, 29 Jul 2002 09:22:29 +0000
Subject: [PATCH] made argument of GetObjectRef() a const TObject*. Idem for
 TMap::GetValue(). Suggestion by Axel.

git-svn-id: http://root.cern.ch/svn/root/trunk@5022 27541ba8-7e3a-0410-8455-c3a389f83636
---
 cont/inc/TBtree.h           |  4 ++--
 cont/inc/TCollection.h      |  4 ++--
 cont/inc/THashTable.h       |  4 ++--
 cont/inc/TList.h            |  4 ++--
 cont/inc/TMap.h             |  6 +++---
 cont/inc/TObjArray.h        |  4 ++--
 cont/inc/TOrdCollection.h   |  4 ++--
 cont/inc/TRefArray.h        |  4 ++--
 cont/src/THashTable.cxx     |  4 ++--
 cont/src/TList.cxx          |  4 ++--
 cont/src/TMap.cxx           |  4 ++--
 cont/src/TObjArray.cxx      |  6 +++---
 cont/src/TOrdCollection.cxx |  4 ++--
 cont/src/TRefArray.cxx      | 10 +++++-----
 14 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/cont/inc/TBtree.h b/cont/inc/TBtree.h
index 3eb075528e9..bcee158e0f5 100644
--- a/cont/inc/TBtree.h
+++ b/cont/inc/TBtree.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TBtree.h,v 1.5 2001/03/30 15:46:09 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TBtree.h,v 1.6 2001/03/31 15:01:57 rdm Exp $
 // Author: Fons Rademakers   10/10/95
 
 /*************************************************************************
@@ -80,7 +80,7 @@ public:
    void        Delete(Option_t *option="");
    TObject    *FindObject(const char *name) const;
    TObject    *FindObject(const TObject *obj) const;
-   TObject   **GetObjectRef(TObject *) const { return 0; }
+   TObject   **GetObjectRef(const TObject *) const { return 0; }
    TIterator  *MakeIterator(Bool_t dir = kIterForward) const;
 
    void        Add(TObject *obj);
diff --git a/cont/inc/TCollection.h b/cont/inc/TCollection.h
index 4621da9d551..a459e5078da 100644
--- a/cont/inc/TCollection.h
+++ b/cont/inc/TCollection.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TCollection.h,v 1.9 2001/07/05 16:50:50 rdm Exp $
+// @(#)root/cont:$Name:  $:$Id: TCollection.h,v 1.10 2002/06/12 16:46:11 rdm Exp $
 // Author: Fons Rademakers   13/08/95
 
 /*************************************************************************
@@ -81,7 +81,7 @@ public:
    TObject           *operator()(const char *name) const;
    virtual TObject   *FindObject(const TObject *obj) const;
    virtual const char *GetName() const;
-   virtual TObject  **GetObjectRef(TObject *obj) const = 0;
+   virtual TObject  **GetObjectRef(const TObject *obj) const = 0;
    virtual Int_t      GetSize() const { return fSize; }
    virtual Int_t      GrowBy(Int_t delta) const;
    Bool_t             IsArgNull(const char *where, const TObject *obj) const;
diff --git a/cont/inc/THashTable.h b/cont/inc/THashTable.h
index 59f1b6fb784..84ec602dea2 100644
--- a/cont/inc/THashTable.h
+++ b/cont/inc/THashTable.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: THashTable.h,v 1.4 2001/03/29 11:25:00 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: THashTable.h,v 1.5 2001/04/10 15:27:37 rdm Exp $
 // Author: Fons Rademakers   27/09/95
 
 /*************************************************************************
@@ -61,7 +61,7 @@ public:
    void          Delete(Option_t *option="");
    TObject      *FindObject(const char *name) const;
    TObject      *FindObject(const TObject *obj) const;
-   TObject     **GetObjectRef(TObject *obj) const;
+   TObject     **GetObjectRef(const TObject *obj) const;
    Int_t         GetSize() const { return fEntries; }
    TIterator    *MakeIterator(Bool_t dir = kIterForward) const;
    void          Rehash(Int_t newCapacity, Bool_t checkObjValidity = kTRUE);
diff --git a/cont/inc/TList.h b/cont/inc/TList.h
index aed296ed189..9ddd429027c 100644
--- a/cont/inc/TList.h
+++ b/cont/inc/TList.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TList.h,v 1.7 2001/03/29 10:57:01 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TList.h,v 1.8 2001/03/29 11:25:00 brun Exp $
 // Author: Fons Rademakers   10/08/95
 
 /*************************************************************************
@@ -83,7 +83,7 @@ public:
    virtual TObject  *Before(TObject *obj) const;
    virtual TObject  *First() const;
    virtual TObjLink *FirstLink() const { return fFirst; }
-   virtual TObject **GetObjectRef(TObject *obj) const;
+   virtual TObject **GetObjectRef(const TObject *obj) const;
    virtual TObject  *Last() const;
    virtual TObjLink *LastLink() const { return fLast; }
 
diff --git a/cont/inc/TMap.h b/cont/inc/TMap.h
index 4df503134f1..955ef8d4dfc 100644
--- a/cont/inc/TMap.h
+++ b/cont/inc/TMap.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TMap.h,v 1.9 2001/12/07 21:58:59 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TMap.h,v 1.10 2002/07/24 13:23:17 rdm Exp $
 // Author: Fons Rademakers   12/11/95
 
 /*************************************************************************
@@ -57,8 +57,8 @@ public:
    void              DeleteAll();
    TObject          *FindObject(const char *keyname) const;
    TObject          *FindObject(const TObject *key) const;
-   TObject         **GetObjectRef(TObject *obj) const {return fTable->GetObjectRef(obj);}
-   TObject          *GetValue(TObject *key) const;
+   TObject         **GetObjectRef(const TObject *obj) const { return fTable->GetObjectRef(obj); }
+   TObject          *GetValue(const TObject *key) const;
    TIterator        *MakeIterator(Bool_t dir = kIterForward) const;
    void              Print(Option_t *option="") const;
    void              Rehash(Int_t newCapacity, Bool_t checkObjValidity = kTRUE);
diff --git a/cont/inc/TObjArray.h b/cont/inc/TObjArray.h
index 9cdb579587b..a9044b0613c 100644
--- a/cont/inc/TObjArray.h
+++ b/cont/inc/TObjArray.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TObjArray.h,v 1.9 2001/07/12 17:29:14 rdm Exp $
+// @(#)root/cont:$Name:  $:$Id: TObjArray.h,v 1.10 2002/04/04 11:03:18 brun Exp $
 // Author: Fons Rademakers   11/09/95
 
 /*************************************************************************
@@ -53,7 +53,7 @@ public:
    Int_t            GetEntries() const;
    Int_t            GetEntriesFast() const {return GetAbsLast()+1;}  //only OK when no gaps
    Int_t            GetLast() const;
-   TObject        **GetObjectRef(TObject *obj) const;
+   TObject        **GetObjectRef(const TObject *obj) const;
    Bool_t           IsEmpty() const { return GetAbsLast() == -1; }
    TIterator       *MakeIterator(Bool_t dir = kIterForward) const;
 
diff --git a/cont/inc/TOrdCollection.h b/cont/inc/TOrdCollection.h
index 33165a502f9..62c1e86dae0 100644
--- a/cont/inc/TOrdCollection.h
+++ b/cont/inc/TOrdCollection.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TOrdCollection.h,v 1.3 2001/03/29 10:57:01 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TOrdCollection.h,v 1.4 2001/03/29 11:25:00 brun Exp $
 // Author: Fons Rademakers   13/09/95
 
 /*************************************************************************
@@ -53,7 +53,7 @@ public:
    ~TOrdCollection();
    void          Clear(Option_t *option="");
    void          Delete(Option_t *option="");
-   TObject     **GetObjectRef(TObject *obj) const;
+   TObject     **GetObjectRef(const TObject *obj) const;
    Int_t         IndexOf(const TObject *obj) const;
    TIterator    *MakeIterator(Bool_t dir = kIterForward) const;
 
diff --git a/cont/inc/TRefArray.h b/cont/inc/TRefArray.h
index cceb4068a36..b6bcd3c309b 100644
--- a/cont/inc/TRefArray.h
+++ b/cont/inc/TRefArray.h
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TRefArray.h,v 1.7 2002/05/25 21:00:36 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TRefArray.h,v 1.8 2002/06/04 19:51:14 brun Exp $
 // Author: Rene Brun    02/10/2001
 
 /*************************************************************************
@@ -62,7 +62,7 @@ public:
    Int_t            GetEntries() const;
    Int_t            GetEntriesFast() const {return GetAbsLast()+1;}  //only OK when no gaps
    Int_t            GetLast() const;
-   TObject        **GetObjectRef(TObject *obj) const;
+   TObject        **GetObjectRef(const TObject *obj) const;
    TProcessID      *GetPID() const {return fPID;}
    UInt_t           GetUID(Int_t at) const;
    Bool_t           IsEmpty() const { return GetAbsLast() == -1; }
diff --git a/cont/src/THashTable.cxx b/cont/src/THashTable.cxx
index ee661b1cb4b..e69a89305ce 100644
--- a/cont/src/THashTable.cxx
+++ b/cont/src/THashTable.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: THashTable.cxx,v 1.5 2001/03/29 11:25:00 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: THashTable.cxx,v 1.6 2002/05/18 08:43:30 brun Exp $
 // Author: Fons Rademakers   27/09/95
 
 /*************************************************************************
@@ -183,7 +183,7 @@ TObject *THashTable::FindObject(const TObject *obj) const
 }
 
 //______________________________________________________________________________
-TObject **THashTable::GetObjectRef(TObject *obj) const
+TObject **THashTable::GetObjectRef(const TObject *obj) const
 {
    // Return address of pointer to obj
 
diff --git a/cont/src/TList.cxx b/cont/src/TList.cxx
index 14852df52b9..9dbbe2b98b7 100644
--- a/cont/src/TList.cxx
+++ b/cont/src/TList.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TList.cxx,v 1.11 2001/08/17 18:44:57 rdm Exp $
+// @(#)root/cont:$Name:  $:$Id: TList.cxx,v 1.12 2002/05/18 08:43:30 brun Exp $
 // Author: Fons Rademakers   10/08/95
 
 /*************************************************************************
@@ -473,7 +473,7 @@ TObject *TList::First() const
 }
 
 //______________________________________________________________________________
-TObject **TList::GetObjectRef(TObject *obj) const
+TObject **TList::GetObjectRef(const TObject *obj) const
 {
    // Return address of pointer to obj
 
diff --git a/cont/src/TMap.cxx b/cont/src/TMap.cxx
index cd5fdd9edf1..a6b845bfad8 100644
--- a/cont/src/TMap.cxx
+++ b/cont/src/TMap.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TMap.cxx,v 1.6 2002/05/18 08:43:30 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TMap.cxx,v 1.7 2002/07/24 13:23:17 rdm Exp $
 // Author: Fons Rademakers   12/11/95
 
 /*************************************************************************
@@ -186,7 +186,7 @@ TObject *TMap::FindObject(const TObject *key) const
 }
 
 //______________________________________________________________________________
-TObject *TMap::GetValue(TObject *key) const
+TObject *TMap::GetValue(const TObject *key) const
 {
    // Returns a pointer to the value associated with key.
 
diff --git a/cont/src/TObjArray.cxx b/cont/src/TObjArray.cxx
index 5ed346dbb2b..670559c2211 100644
--- a/cont/src/TObjArray.cxx
+++ b/cont/src/TObjArray.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TObjArray.cxx,v 1.16 2002/05/18 10:45:10 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TObjArray.cxx,v 1.17 2002/07/13 21:57:58 brun Exp $
 // Author: Fons Rademakers   11/09/95
 
 /*************************************************************************
@@ -303,7 +303,7 @@ void TObjArray::Streamer(TBuffer &b)
          fName.Streamer(b);
 
       if (GetEntriesFast() > 0) Clear();
-      
+
       b >> nobjects;
       b >> fLowerBound;
       if (nobjects >= fSize) Expand(nobjects);
@@ -399,7 +399,7 @@ Int_t TObjArray::GetLast() const
 }
 
 //______________________________________________________________________________
-TObject **TObjArray::GetObjectRef(TObject *obj) const
+TObject **TObjArray::GetObjectRef(const TObject *obj) const
 {
    // Return address of pointer obj.
 
diff --git a/cont/src/TOrdCollection.cxx b/cont/src/TOrdCollection.cxx
index b85423049e9..626d697e9be 100644
--- a/cont/src/TOrdCollection.cxx
+++ b/cont/src/TOrdCollection.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TOrdCollection.cxx,v 1.7 2001/11/16 02:47:36 rdm Exp $
+// @(#)root/cont:$Name:  $:$Id: TOrdCollection.cxx,v 1.8 2002/05/18 08:43:30 brun Exp $
 // Author: Fons Rademakers   13/09/95
 
 /*************************************************************************
@@ -228,7 +228,7 @@ TObject *TOrdCollection::First() const
 }
 
 //______________________________________________________________________________
-TObject **TOrdCollection::GetObjectRef(TObject *obj) const
+TObject **TOrdCollection::GetObjectRef(const TObject *obj) const
 {
    // return address of pointer obj
    Int_t index = IndexOf(obj);
diff --git a/cont/src/TRefArray.cxx b/cont/src/TRefArray.cxx
index ab9246538a0..bbe70044fe6 100644
--- a/cont/src/TRefArray.cxx
+++ b/cont/src/TRefArray.cxx
@@ -1,4 +1,4 @@
-// @(#)root/cont:$Name:  $:$Id: TRefArray.cxx,v 1.13 2002/06/16 09:10:19 brun Exp $
+// @(#)root/cont:$Name:  $:$Id: TRefArray.cxx,v 1.14 2002/07/09 21:00:37 brun Exp $
 // Author: Rene Brun  02/10/2001
 
 /*************************************************************************
@@ -335,7 +335,7 @@ void TRefArray::Streamer(TBuffer &R__b)
           if (gDebug > 1) {
              printf(" %d",fUIDs[i]);
              if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
-          }      
+          }
       }
       Changed();
       R__b.CheckByteCount(R__s, R__c,TRefArray::IsA());
@@ -349,13 +349,13 @@ void TRefArray::Streamer(TBuffer &R__b)
       pidf = TProcessID::WriteProcessID(fPID,file);
       R__b << pidf;
       if (gDebug > 1) printf("Writing TRefArray, pidf=%d, fPID=%lx, nobjects=%d\n",pidf,(Long_t)fPID,nobjects);
-      
+
       for (Int_t i = 0; i < nobjects; i++) {
           R__b << fUIDs[i];
           if (gDebug > 1) {
              printf(" %d",fUIDs[i]);
              if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
-          }      
+          }
       }
       R__b.SetByteCount(R__c, kTRUE);
    }
@@ -427,7 +427,7 @@ Int_t TRefArray::GetLast() const
 }
 
 //______________________________________________________________________________
-TObject **TRefArray::GetObjectRef(TObject *obj) const
+TObject **TRefArray::GetObjectRef(const TObject *obj) const
 {
    // Return address of pointer obj.
 
-- 
GitLab