Skip to content
Snippets Groups Projects
Commit 38f4f689 authored by Guillaume Baulieu's avatar Guillaume Baulieu
Browse files

Parameters passed by copy can not be modified -> pass them by reference

parent 0aac6fc9
No related branches found
No related tags found
No related merge requests found
......@@ -148,21 +148,21 @@ public:
static void Zero(Double_t *p, UInt_t nb)
{ if ( nb < 1 ) return; ::memset(p,0,sizeof(Double_t)*nb); }
static void Delete(Char_t *p)
static void Delete(Char_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(Short_t *p)
static void Delete(Short_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(Int_t *p)
static void Delete(Int_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(UChar_t *p)
static void Delete(UChar_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(UShort_t *p)
static void Delete(UShort_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(UInt_t *p)
static void Delete(UInt_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(Float_t *p)
static void Delete(Float_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
static void Delete(Double_t *p)
static void Delete(Double_t * &p)
{ if ( p ) { delete [] p; p = NULL;} }
//! copy the content from -> to
......
......@@ -111,14 +111,14 @@ public:
// static Long_t *New(Long_t *p, UInt_t nb = 32*KBYTE);
// static ULong_t *New(ULong_t *p, UInt_t nb = 32*KBYTE);
static void Delete(Char_t *p) { ::delete [] p; p = NULL; }
static void Delete(Short_t *p) { ::delete [] p; p = NULL; }
static void Delete(Int_t *p) { ::delete [] p; p = NULL; }
static void Delete(UChar_t *p) { ::delete [] p; p = NULL; }
static void Delete(UShort_t *p) { ::delete [] p; p = NULL; }
static void Delete(UInt_t *p) { ::delete [] p; p = NULL; }
static void Delete(Float_t *p) { ::delete [] p; p = NULL; }
static void Delete(Double_t *p) { ::delete [] p; p = NULL; }
static void Delete(Char_t * &p) { ::delete [] p; p = NULL; }
static void Delete(Short_t * &p) { ::delete [] p; p = NULL; }
static void Delete(Int_t * &p) { ::delete [] p; p = NULL; }
static void Delete(UChar_t * &p) { ::delete [] p; p = NULL; }
static void Delete(UShort_t * &p) { ::delete [] p; p = NULL; }
static void Delete(UInt_t * &p) { ::delete [] p; p = NULL; }
static void Delete(Float_t * &p) { ::delete [] p; p = NULL; }
static void Delete(Double_t * &p) { ::delete [] p; p = NULL; }
// static void Delete(Long_t *p) { ::delete [] p; p = NULL; }
// static void Delete(ULong_t *p) { ::delete [] p; p = NULL; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment