Commit df73e1d4 authored by Gabriele Cosmo's avatar Gabriele Cosmo
Browse files

Fixed shadowing compilation warnings on gcc-11...

parent 759c5763
18 May 2021 - G.Cosmo
* Fixed compilation warnings on gcc-11 for shadowing in Random headers.
============================== ==============================
19.01.21 Release CLHEP-2.4.4.1 19.01.21 Release CLHEP-2.4.4.1
============================== ==============================
......
...@@ -145,6 +145,7 @@ private: ...@@ -145,6 +145,7 @@ private:
#if defined __GNUC__ #if defined __GNUC__
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing" #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif #endif
inline double convert1double(myuint_t u) inline double convert1double(myuint_t u)
{ {
......
...@@ -65,29 +65,29 @@ public: ...@@ -65,29 +65,29 @@ public:
// Static methods to shoot random values using the static generator // Static methods to shoot random values using the static generator
static long shoot( double m=1.0 ); static long shoot( double mean=1.0 );
static void shootArray ( const int size, long* vect, double m=1.0 ); static void shootArray ( const int size, long* vect, double mean=1.0 );
// Static methods to shoot random values using a given engine // Static methods to shoot random values using a given engine
// by-passing the static generator. // by-passing the static generator.
static long shoot( HepRandomEngine* anEngine, double m=1.0 ); static long shoot( HepRandomEngine* anEngine, double mean=1.0 );
static void shootArray ( HepRandomEngine* anEngine, static void shootArray ( HepRandomEngine* anEngine,
const int size, long* vect, double m=1.0 ); const int size, long* vect, double mean=1.0 );
// Methods using the localEngine to shoot random values, by-passing // Methods using the localEngine to shoot random values, by-passing
// the static generator. // the static generator.
long fire(); long fire();
long fire( double m ); long fire( double mean );
void fireArray ( const int size, long* vect ); void fireArray ( const int size, long* vect );
void fireArray ( const int size, long* vect, double m); void fireArray ( const int size, long* vect, double mean);
double operator()(); double operator()();
double operator()( double m ); double operator()( double mean );
std::string name() const; std::string name() const;
HepRandomEngine & engine(); HepRandomEngine & engine();
......
...@@ -73,29 +73,29 @@ public: ...@@ -73,29 +73,29 @@ public:
// Static methods to shoot random values using the static generator // Static methods to shoot random values using the static generator
static long shoot( double m=1.0 ); static long shoot( double mean=1.0 );
static void shootArray ( const int size, long* vect, double m=1.0 ); static void shootArray ( const int size, long* vect, double mean=1.0 );
// Static methods to shoot random values using a given engine // Static methods to shoot random values using a given engine
// by-passing the static generator. // by-passing the static generator.
static long shoot( HepRandomEngine* anEngine, double m=1.0 ); static long shoot( HepRandomEngine* anEngine, double mean=1.0 );
static void shootArray ( HepRandomEngine* anEngine, static void shootArray ( HepRandomEngine* anEngine,
const int size, long* vect, double m=1.0 ); const int size, long* vect, double mean=1.0 );
// Methods using the localEngine to shoot random values, by-passing // Methods using the localEngine to shoot random values, by-passing
// the static generator. // the static generator.
long fire(); long fire();
long fire( double m ); long fire( double mean );
void fireArray ( const int size, long* vect ); void fireArray ( const int size, long* vect );
void fireArray ( const int size, long* vect, double m); void fireArray ( const int size, long* vect, double mean);
double operator()(); double operator()();
double operator()( double m ); double operator()( double mean );
std::string name() const; std::string name() const;
HepRandomEngine & engine(); HepRandomEngine & engine();
......
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
// Static member functions using the static generator // Static member functions using the static generator
// -------------------------------------------------- // --------------------------------------------------
static void setTheSeed(long seed, int lux=3); static void setTheSeed(long seed, int lxr=3);
// (Re)Initializes the generator with a seed. // (Re)Initializes the generator with a seed.
static long getTheSeed(); static long getTheSeed();
......
...@@ -53,8 +53,8 @@ public: ...@@ -53,8 +53,8 @@ public:
Ranlux64Engine( std::istream& is ); Ranlux64Engine( std::istream& is );
Ranlux64Engine(); Ranlux64Engine();
Ranlux64Engine( long seed, int lux = 1 ); Ranlux64Engine( long seed, int lxr = 1 );
Ranlux64Engine( int rowIndex, int colIndex, int lux ); Ranlux64Engine( int rowIndex, int colIndex, int lxr );
virtual ~Ranlux64Engine(); virtual ~Ranlux64Engine();
// Constructors and destructor // Constructors and destructor
...@@ -65,10 +65,10 @@ public: ...@@ -65,10 +65,10 @@ public:
void flatArray (const int size, double* vect); void flatArray (const int size, double* vect);
// Fills the array "vect" of specified size with flat random values. // Fills the array "vect" of specified size with flat random values.
void setSeed(long seed, int lux=1); void setSeed(long seed, int lxr=1);
// Sets the state of the algorithm according to seed. // Sets the state of the algorithm according to seed.
void setSeeds(const long * seeds, int lux=1); void setSeeds(const long * seeds, int lxr=1);
// Sets the state of the algorithm according to the zero terminated // Sets the state of the algorithm according to the zero terminated
// array of seeds. Only the first seed is used. // array of seeds. Only the first seed is used.
......
...@@ -49,8 +49,8 @@ public: ...@@ -49,8 +49,8 @@ public:
RanluxEngine( std::istream& is ); RanluxEngine( std::istream& is );
RanluxEngine(); RanluxEngine();
RanluxEngine( long seed, int lux = 3 ); RanluxEngine( long seed, int lxr = 3 );
RanluxEngine( int rowIndex, int colIndex, int lux ); RanluxEngine( int rowIndex, int colIndex, int lxr );
virtual ~RanluxEngine(); virtual ~RanluxEngine();
// Constructors and destructor // Constructors and destructor
...@@ -72,10 +72,10 @@ public: ...@@ -72,10 +72,10 @@ public:
void flatArray (const int size, double* vect); void flatArray (const int size, double* vect);
// Fills the array "vect" of specified size with flat random values. // Fills the array "vect" of specified size with flat random values.
void setSeed(long seed, int lux=3); void setSeed(long seed, int lxr=3);
// Sets the state of the algorithm according to seed. // Sets the state of the algorithm according to seed.
void setSeeds(const long * seeds, int lux=3); void setSeeds(const long * seeds, int lxr=3);
// Sets the state of the algorithm according to the zero terminated // Sets the state of the algorithm according to the zero terminated
// array of seeds. Only the first seed is used. // array of seeds. Only the first seed is used.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment