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
==============================
......
......@@ -145,6 +145,7 @@ private:
#if defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
inline double convert1double(myuint_t u)
{
......
......@@ -65,29 +65,29 @@ public:
// 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
// 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,
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
// the static generator.
long fire();
long fire( double m );
long fire( double mean );
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 m );
double operator()( double mean );
std::string name() const;
HepRandomEngine & engine();
......
......@@ -73,29 +73,29 @@ public:
// 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
// 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,
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
// the static generator.
long fire();
long fire( double m );
long fire( double mean );
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 m );
double operator()( double mean );
std::string name() const;
HepRandomEngine & engine();
......
......@@ -96,7 +96,7 @@ public:
// 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.
static long getTheSeed();
......
......@@ -53,8 +53,8 @@ public:
Ranlux64Engine( std::istream& is );
Ranlux64Engine();
Ranlux64Engine( long seed, int lux = 1 );
Ranlux64Engine( int rowIndex, int colIndex, int lux );
Ranlux64Engine( long seed, int lxr = 1 );
Ranlux64Engine( int rowIndex, int colIndex, int lxr );
virtual ~Ranlux64Engine();
// Constructors and destructor
......@@ -65,10 +65,10 @@ public:
void flatArray (const int size, double* vect);
// 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.
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
// array of seeds. Only the first seed is used.
......
......@@ -49,8 +49,8 @@ public:
RanluxEngine( std::istream& is );
RanluxEngine();
RanluxEngine( long seed, int lux = 3 );
RanluxEngine( int rowIndex, int colIndex, int lux );
RanluxEngine( long seed, int lxr = 3 );
RanluxEngine( int rowIndex, int colIndex, int lxr );
virtual ~RanluxEngine();
// Constructors and destructor
......@@ -72,10 +72,10 @@ public:
void flatArray (const int size, double* vect);
// 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.
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
// 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