diff options
author | Dimitrios Apostolou <jimis@qt.io> | 2020-07-04 02:47:36 +0200 |
---|---|---|
committer | Dimitrios Apostolou <jimis@qt.io> | 2020-07-10 02:36:47 +0200 |
commit | a5e6e0dd2e17dedde9331fc791df8ad9e4fee83f (patch) | |
tree | 592d0b1af6d1288aa03eef3084da742bebcd7ee6 /src/corelib/global/qrandom.cpp | |
parent | 3736ebf7c8d0d68e5cf128a12c41d192795e6503 (diff) |
Rename local variable hiding global one with the same name
As found by LGTM.com.
Change-Id: Ic4c38c02529e7cc7eb7c79c3936b7d5f030fd84f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qrandom.cpp')
-rw-r--r-- | src/corelib/global/qrandom.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 1ff481762c..4ebe53d572 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -1249,7 +1249,7 @@ static inline QRandEngine *randTLS() Thread-safe version of the standard C++ \c srand() function. - Sets the argument \a seed to be used to generate a new random number sequence of + Sets the argument \a newSeed to be used to generate a new random number sequence of pseudo random integers to be returned by qrand(). The sequence of random numbers generated is deterministic per thread. For example, @@ -1261,13 +1261,13 @@ static inline QRandEngine *randTLS() \sa qrand(), QRandomGenerator */ -void qsrand(uint seed) +void qsrand(uint newSeed) { auto prng = randTLS(); if (prng) - prng->seed(seed); + prng->seed(newSeed); else - srand(seed); + srand(newSeed); } /*! |