diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-03-14 08:56:46 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-03-17 06:21:52 +0000 |
commit | ae9e43375324dfefaf8ffce32684e499923e9c6b (patch) | |
tree | 9a30672e9f2fc2094ce77d7574b54d01449ab838 /examples/network/threadedfortuneserver/fortuneserver.cpp | |
parent | d6367aca869ee30e15a3861b2990baafb9972aa1 (diff) |
Remove unnecessary int() casting in QRandomGenerator::bounded
Commit 21d39168170c6833512c4a5f53985272741bd7e7 added the 64-bit
version, so qsizetype now works cross-platform. The casts were added to
make qtbase compile on commit df853fed66d891077ae2d04ecfa171d7e2cd5202.
Change-Id: I26b8286f61534f88b649fffd166c409c5c232230
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'examples/network/threadedfortuneserver/fortuneserver.cpp')
-rw-r--r-- | examples/network/threadedfortuneserver/fortuneserver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/threadedfortuneserver/fortuneserver.cpp b/examples/network/threadedfortuneserver/fortuneserver.cpp index a93bbc7058..73d7e22531 100644 --- a/examples/network/threadedfortuneserver/fortuneserver.cpp +++ b/examples/network/threadedfortuneserver/fortuneserver.cpp @@ -72,7 +72,7 @@ FortuneServer::FortuneServer(QObject *parent) //! [1] void FortuneServer::incomingConnection(qintptr socketDescriptor) { - QString fortune = fortunes.at(QRandomGenerator::global()->bounded(int(fortunes.size()))); + QString fortune = fortunes.at(QRandomGenerator::global()->bounded(fortunes.size())); FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this); connect(thread, &FortuneThread::finished, thread, &FortuneThread::deleteLater); thread->start(); |