mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
minor cleanups
This commit is contained in:
parent
0ef00dd437
commit
7e13352a95
29 changed files with 102 additions and 134 deletions
|
|
@ -1,14 +1,13 @@
|
|||
#include "random.h"
|
||||
#include <QThread>
|
||||
#include <QDateTime>
|
||||
#include <stdlib.h>
|
||||
|
||||
void Random::init()
|
||||
Random::Random(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
if (initialized)
|
||||
return;
|
||||
int seed = QDateTime::currentDateTime().toTime_t();
|
||||
qDebug(QString("%1: qsrand(%2)").arg(thread()->metaObject()->className()).arg(seed).toLatin1());
|
||||
qDebug(QString("qsrand(%1)").arg(seed).toLatin1());
|
||||
qsrand(seed);
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
unsigned int Random::getNumber(unsigned int min, unsigned int max)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue