Doc: fix QRandomGenerator missing updates after rename
Commit 282065d443c2a2d6b9e32d786c2c1c7552ba3cb5 renamed the generator functions but we didn't update all the docs. Change-Id: I0a103569c81b4711a649fffd14ec877ffbfe710d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
13b6c1e625
commit
d4ea12e260
@ -461,7 +461,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
|
|
||||||
The class can generate 32-bit or 64-bit quantities, or fill an array of
|
The class can generate 32-bit or 64-bit quantities, or fill an array of
|
||||||
those. The most common way of generating new values is to call the generate(),
|
those. The most common way of generating new values is to call the generate(),
|
||||||
get64() or fillRange() functions. One would use it as:
|
generate64() or fillRange() functions. One would use it as:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
quint32 value = QRandomGenerator::generate();
|
quint32 value = QRandomGenerator::generate();
|
||||||
@ -626,7 +626,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
quantities, one can write:
|
quantities, one can write:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
std::generate(begin, end, []() { return get64(); });
|
std::generate(begin, end, []() { return QRandomGenerator::generate64(); });
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
If the range refers to contiguous memory (such as an array or the data from
|
If the range refers to contiguous memory (such as an array or the data from
|
||||||
@ -678,14 +678,14 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
QRandomGenerator::fillRange(array);
|
QRandomGenerator::fillRange(array);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
It would have also been possible to make one call to get64() and then split
|
It would have also been possible to make one call to generate64() and then split
|
||||||
the two halves of the 64-bit value.
|
the two halves of the 64-bit value.
|
||||||
|
|
||||||
\sa generate()
|
\sa generate()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn qreal QRandomGenerator::generateReal()
|
\fn qreal QRandomGenerator::generateDouble()
|
||||||
|
|
||||||
Generates one random qreal in the canonical range [0, 1) (that is,
|
Generates one random qreal in the canonical range [0, 1) (that is,
|
||||||
inclusive of zero and exclusive of 1).
|
inclusive of zero and exclusive of 1).
|
||||||
@ -700,7 +700,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
\c{\l{http://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution}{std::uniform_real_distribution}}
|
\c{\l{http://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution}{std::uniform_real_distribution}}
|
||||||
with parameters 0 and 1.
|
with parameters 0 and 1.
|
||||||
|
|
||||||
\sa generate(), get64(), bounded()
|
\sa generate(), generate64(), bounded()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -738,7 +738,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of quint32. Instead, use generate().
|
range of quint32. Instead, use generate().
|
||||||
|
|
||||||
\sa generate(), get64(), generateDouble()
|
\sa generate(), generate64(), generateDouble()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -751,7 +751,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of int. Instead, use generate() and cast to int.
|
range of int. Instead, use generate() and cast to int.
|
||||||
|
|
||||||
\sa generate(), get64(), generateDouble()
|
\sa generate(), generate64(), generateDouble()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -775,7 +775,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of quint32. Instead, use generate().
|
range of quint32. Instead, use generate().
|
||||||
|
|
||||||
\sa generate(), get64(), generateDouble()
|
\sa generate(), generate64(), generateDouble()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -788,7 +788,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of int. Instead, use generate() and cast to int.
|
range of int. Instead, use generate() and cast to int.
|
||||||
|
|
||||||
\sa generate(), get64(), generateDouble()
|
\sa generate(), generate64(), generateDouble()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -896,7 +896,7 @@ static Q_NEVER_INLINE void fill(void *buffer, void *bufferEnd)
|
|||||||
int value = QRandomGenerator::generate() & std::numeric_limits<int>::max();
|
int value = QRandomGenerator::generate() & std::numeric_limits<int>::max();
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\sa get64(), generateDouble()
|
\sa generate64(), generateDouble()
|
||||||
*/
|
*/
|
||||||
quint32 QRandomGenerator::generate()
|
quint32 QRandomGenerator::generate()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user