Remove dead code in qrandom

After 9ee554ac1d, the various static
inline versions of randTLS are no longer used, which clang warns
about.

Change-Id: I6dc21c0aab35fb6a8ca9e8d43ee4960ee844ef47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Volker Hilsheimer 2020-08-16 10:54:27 +02:00
parent 135b16900e
commit 81896304dc
1 changed files with 0 additions and 25 deletions

View File

@ -1217,29 +1217,4 @@ struct QRandEngine
};
}
#if defined(Q_OS_WIN)
// On Windows srand() and rand() already use Thread-Local-Storage
// to store the seed between calls
static inline QRandEngine *randTLS()
{
return nullptr;
}
#elif defined(Q_COMPILER_THREAD_LOCAL)
static inline QRandEngine *randTLS()
{
thread_local QRandEngine r;
return &r;
}
#else
Q_GLOBAL_STATIC(QThreadStorage<QRandEngine>, g_randTLS)
static inline QRandEngine *randTLS()
{
auto tls = g_randTLS();
if (!tls)
return nullptr;
return &tls->localData();
}
#endif
QT_END_NAMESPACE